-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Form onFocus/onBlur not firing #872
Comments
Hello @web2wire thanks for the issue. It is odd that React fires As a workaround, you can listen for the EDIT: Here is a fork of your |
Thanks for the speedy reply @pl12133. Your suggestion works fine so will close this issue. I found a discussion about this among the React devs (facebook/react#6410) though no-one really seems to know why it was done this way in the first place. |
Just to add to the topic. I have the exact same issue. |
Is there a reason Preact chose to match vanilla JavaScript behavior and not React? This seems like it could cause compatibility changes when using React libraries with Preact. For example, switching to Preact breaks |
The more likely conclusion here would be to have |
I am migrating some forms over from react. These include onFocus and onBlur handlers on the form tags to prevent background updates of the form (from ajax) if the form is being edited. While these events fire in React they do not appear to do so in Preact.
Here is the working React example, https://codepen.io/web2wire/pen/rGVmWm, and here is a non-working Preact one, https://codepen.io/web2wire/pen/BwNRZB.
Is there anything else I should be doing to get these handlers working? I am using preact-compat in my application.
The text was updated successfully, but these errors were encountered: