Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Firefox: checkbox validation not triggered with validateOnBlur #134

Closed
jedrzejiwanicki opened this issue Jan 26, 2018 · 11 comments
Closed

Comments

@jedrzejiwanicki
Copy link

What is the current behavior?

Passing validateOnBlur prop to Form results in not validating the checkbox input in Firefox browser, as onBlur is not triggered in that browser.

What is the expected behavior?

Checkbox input should be validated.

Sandbox Link

Here is the issue presented. I placed two checkboxes, one with bug behavior, second with my workaround. To encounter the issue, please run it in Firefox.

https://codesandbox.io/s/yyw1r626z

What's your environment?

React Final Form: 3.0.5
Final Form: 4.0.1
Browser: Firefox 57.0.4

@maciejmyslinski
Copy link
Contributor

When the first thing I did was checking the first checkbox, it worked.
However, when the first thing I did anything else (like click a button or check the second one) the bug occurred.

From what I can see it has something to do with onBlur event not firing on FF when one would expect.

I or @jedrzejiwanicki could propose a solution if you @erikras agree.

@maciejmyslinski
Copy link
Contributor

@erikras ping

@maciejmyslinski
Copy link
Contributor

@erikras any update?

@valyefimov
Copy link

Same for me

@dkulakov
Copy link

Having the same issue

@tylim88
Copy link

tylim88 commented May 16, 2019

issue still persist

@hypeofpipe
Copy link

Issue still exists :/

@hypeofpipe
Copy link

@jedrzejiwanicki did you manage to fix the issue? 🤔

@jedrzejiwanicki
Copy link
Author

@hypeofpipe Haven't submitted a PR unfortunately, my example has a workaround, have you tried it?

@hypeofpipe
Copy link

Yes, thank you, didn't notice it 🎉 ❤️

@gertdreyer
Copy link
Collaborator

This is a known difference between how Chrome vs Firefox and Safari handles checkbox focus - I you use tab to tab through the checkboxes the blur event fires its just on clicks which it does not.
See:

angular/angular#28830
https://bugzilla.mozilla.org/show_bug.cgi?id=756028
https://bugs.webkit.org/show_bug.cgi?id=13724

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 14, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants