Skip to content

Commit

Permalink
Merge pull request #1595 from tivac/issues-1593
Browse files Browse the repository at this point in the history
Loose comparison when early-outing from setting attributes
  • Loading branch information
lhorie authored Feb 18, 2017
2 parents 0412ed8 + 5ab2cf4 commit 732ddf0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions render/render.js
Original file line number Diff line number Diff line change
Expand Up @@ -463,11 +463,11 @@ module.exports = function($window) {
else if (key === "style") updateStyle(element, old, value)
else if (key in element && !isAttribute(key) && ns === undefined && !isCustomElement(vnode)) {
//setting input[value] to same value by typing on focused element moves cursor to end in Chrome
if (vnode.tag === "input" && key === "value" && vnode.dom.value === value && vnode.dom === $doc.activeElement) return
if (vnode.tag === "input" && key === "value" && vnode.dom.value == value && vnode.dom === $doc.activeElement) return
//setting select[value] to same value while having select open blinks select dropdown in Chrome
if (vnode.tag === "select" && key === "value" && vnode.dom.value === value && vnode.dom === $doc.activeElement) return
if (vnode.tag === "select" && key === "value" && vnode.dom.value == value && vnode.dom === $doc.activeElement) return
//setting option[value] to same value while having select open blinks select dropdown in Chrome
if (vnode.tag === "option" && key === "value" && vnode.dom.value === value) return
if (vnode.tag === "option" && key === "value" && vnode.dom.value == value) return
element[key] = value
}
else {
Expand Down

0 comments on commit 732ddf0

Please sign in to comment.