-
Notifications
You must be signed in to change notification settings - Fork 780
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
Fix input type=text selection reset. #224
Conversation
Codecov Report
@@ Coverage Diff @@
## master #224 +/- ##
=====================================
Coverage 100% 100%
=====================================
Files 4 4
Lines 163 163
Branches 43 44 +1
=====================================
Hits 163 163
Continue to review full report at Codecov.
|
@@ -145,11 +145,13 @@ export default function(app) { | |||
function updateElementData(element, oldData, data) { | |||
for (var name in merge(oldData, data)) { | |||
var value = data[name] | |||
var oldValue = oldData[name] | |||
var oldValue = name === "value" || name === "checked" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why check for checked
and value
? Any explanation?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are the two "dynamic" attributes of a component whose value can change when the user interacts with the component. So, when diffing an element's data, we want to look at the real DOM (not the stuff in oldData).
I hope that makes sense.
@jbucaran -- will this fix be coming to picodom as well (or is it not necessary?) |
@zaceno Yeah, already fixed in picodom. jorgebucaran/superfine#6 |
Fix input type=text selection reset.
ᕕ( ᐛ )ᕗ 🎉
Related #137.
Ping @mrkstwrt.