-
Notifications
You must be signed in to change notification settings - Fork 25
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
why diffProp function gets most recent property value on "value" update? #40
Comments
In many browsers, though it may not be the case anymore, setting the input value always resets the cursor position/selection. This avoids setting it if it has not changed so as not to reset the cursor when you are typing. It's a common bit of virtual DOM "lore". https://github.com/elm/virtual-dom/blob/5a5bcf48720bc7d53461b3cd42a9f19f119c5503/src/Elm/Kernel/VirtualDom.js#L496 |
snabbdom does this only for why elm does this for |
I don't know the answer to that. I've never had issues with checked. You could maybe follow the blame for that code. |
it comes from this notice the I dont know if this happens in halogen too |
here
purescript-halogen-vdom/src/Halogen/VDom/DOM/Prop.purs
Lines 149 to 155 in 8b91e55
well, I kind of understand why, but still want to know the explanation
the other question is should we update other propNames this way?
for example react calls
value
,checked
,selected
the Controlled attributes and handles them differently (diffHydratedProperties)The text was updated successfully, but these errors were encountered: