-
-
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
DOM event props capitalization: onFocusIn v. onFocusin v. onfocusin #1611
Comments
Hey @maranomynet, indeed, As an alternative perhaps you could rely on [1] The supported part is actually driven by the fact that the event exists on the Global Event Interface and they do not. Just try it in your console |
Ah, I see now that My initial interpretation of "no synthetic events, just plain browser events" and what must have been a simple coding error with (...similar to the difference in Preact's Out of curiosity: Is there anything technically wrong with useing lower case event props instead of the camelCased ones? |
@maranomynet no, there is nothing wrong with using lowercased events. In fact we map those 1:1 to native DOM events👍 |
I was trying to bind a
focusin
event handler to an element, and found out that the only way to do it was to use an all-lower case proponfocusin
.Neither
onFocusin
noronFocusIn
work.I'm not sure if this is a Preact 10 beta related issue, or simply a documentation issue.
Are, perhaps, camelCased event prop-names strictly a React-compatibility feature, and all-lower case event props encouraged by Preact?
If so, that fact should be clearly mentioned under What's missing? or What's Different? in the Preact Guide.
(Using
preact@10.0.0-beta.1
– Firefox, Chrome)The text was updated successfully, but these errors were encountered: