-
-
Notifications
You must be signed in to change notification settings - Fork 925
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 form checkValidity(), remove vnode.dom === .activeElement from isFormAttribute() and setAttr() #2257
Fix form checkValidity(), remove vnode.dom === .activeElement from isFormAttribute() and setAttr() #2257
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -683,7 +683,7 @@ module.exports = function($window) { | |
// Only do the coercion if we're actually going to check the value. | ||
/* eslint-disable no-implicit-coercion */ | ||
//setting input[value] to same value by typing on focused element moves cursor to end in Chrome | ||
if ((vnode.tag === "input" || vnode.tag === "textarea") && vnode.dom.value === "" + value && vnode.dom === $doc.activeElement) return | ||
if ((vnode.tag === "input" || vnode.tag === "textarea") && vnode.dom.value === "" + value) return | ||
//setting select[value] to same value while having select open blinks select dropdown in Chrome | ||
if (vnode.tag === "select" && old !== null && vnode.dom.value === "" + value) return | ||
//setting option[value] to same value while having select open blinks select dropdown in Chrome | ||
|
@@ -747,7 +747,7 @@ module.exports = function($window) { | |
} | ||
} | ||
function isFormAttribute(vnode, attr) { | ||
return attr === "value" || attr === "checked" || attr === "selectedIndex" || attr === "selected" && vnode.dom === $doc.activeElement || vnode.tag === "option" && vnode.dom.parentNode === $doc.activeElement | ||
return attr === "value" || attr === "checked" || attr === "selectedIndex" || attr === "selected" || vnode.tag === "option" && vnode.dom.parentNode === $doc.activeElement | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could you please revert this for now and only fix the one issue with There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Will do! |
||
} | ||
function isLifecycleMethod(attr) { | ||
return attr === "oninit" || attr === "oncreate" || attr === "onupdate" || attr === "onremove" || attr === "onbeforeremove" || attr === "onbeforeupdate" | ||
|
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.
Are we sure removing this
activeElement
check makes sense? It seems to be associated to changing theselected
attr. Do we know what this check was trying to achieve? I don't think it's related to #2256Here is the old condition with parentheses to clarify it.