Skip to content

Drop onblur logic from formidable.js#2655

Merged
Crabcyborg merged 1 commit into
masterfrom
drop_onblur_logic_from_formidable_js
Dec 12, 2025
Merged

Drop onblur logic from formidable.js#2655
Crabcyborg merged 1 commit into
masterfrom
drop_onblur_logic_from_formidable_js

Conversation

@Crabcyborg

Copy link
Copy Markdown
Contributor

Working on replacing jQuery with vanilla JS, I'm noticing that this logic doesn't seem to be required for anything, or documented anywhere.

I can trace it going back to 10+ years ago.

I don't think it's relevant anymore.

@coderabbitai

coderabbitai Bot commented Dec 12, 2025

Copy link
Copy Markdown
Contributor

Walkthrough

Removed a startup routine from the form initialization logic that automatically triggered blur events on empty input and textarea fields within forms marked with the .frm-show-form class. This eliminates automatic blur-trigger behavior during form load.

Changes

Cohort / File(s) Summary
Form initialization routine removal
js/formidable.js
Removed startup code that scanned inputs/textareas with onblur attributes and auto-triggered blur events if fields were empty

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Verification of removed behavior impact: Ensure the auto-blur functionality on initialization was not relied upon by existing form logic or user-facing features
  • Testing of affected forms: Confirm that removing this routine doesn't cause regression in form validation or event handling workflows

Possibly related PRs

Suggested labels

run analysis, run tests

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately and concisely describes the main change: removing onblur logic from formidable.js, which matches the changeset.
Description check ✅ Passed The description is directly related to the changeset, explaining the rationale for removing the onblur logic and the context of modernizing from jQuery.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch drop_onblur_logic_from_formidable_js

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 512429a and 0bf3d83.

📒 Files selected for processing (1)
  • js/formidable.js (0 hunks)
💤 Files with no reviewable changes (1)
  • js/formidable.js
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
  • GitHub Check: PHP 8 tests in WP trunk
  • GitHub Check: PHP 7.4 tests in WP trunk
  • GitHub Check: Cypress
  • GitHub Check: PHP 7.4 tests in WP trunk
  • GitHub Check: Cypress
  • GitHub Check: PHP 8 tests in WP trunk

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@Crabcyborg
Crabcyborg merged commit bc4edaf into master Dec 12, 2025
36 checks passed
@Crabcyborg
Crabcyborg deleted the drop_onblur_logic_from_formidable_js branch December 12, 2025 21:19
@Crabcyborg Crabcyborg modified the milestones: 6.27, 6.26.1 Dec 15, 2025
stephywells pushed a commit that referenced this pull request Apr 4, 2026
…dable_js

Drop onblur logic from formidable.js
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant