Skip to content

fix: Form no validate on hidden_fields#1587

Merged
joondotcode merged 2 commits intomasterfrom
fix/form-no-validate
Mar 25, 2026
Merged

fix: Form no validate on hidden_fields#1587
joondotcode merged 2 commits intomasterfrom
fix/form-no-validate

Conversation

@joondotcode
Copy link
Copy Markdown
Contributor

Changes

Problem: When a form has required fields hidden via CSS (e.g. conditional logic), clicking Submit causes the browser to throw a "not focusable" error because it tries to show a validation tooltip on an invisible element

Solution: Instead of calling reportValidity() on the entire form, loop through form elements and call it on the first one that is both invalid and visible.

Checklist before requesting a review

  • Cleaned up debug prints, comments, and unused code
  • Tested end to end
  • Included screenshots or walkthrough video of change if impacts UX

Related pull requests

Link other PRs here that are related to this change

@joondotcode joondotcode changed the title Fix/form no validate fix: Form no validate on hidden_fields Mar 23, 2026
@joondotcode joondotcode force-pushed the fix/form-no-validate branch from 0afc92b to d3bb40c Compare March 24, 2026 23:47
@joondotcode joondotcode merged commit 92c4e30 into master Mar 25, 2026
7 checks passed
@joondotcode joondotcode deleted the fix/form-no-validate branch March 25, 2026 02:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants