Bundled output for commit 712be2bcc3 [skip ci]
This commit is contained in:
parent
712be2bcc3
commit
6c06d41f94
4 changed files with 1048 additions and 48 deletions
21
mithril.js
21
mithril.js
|
|
@ -833,12 +833,21 @@ var coreRenderer = function($window) {
|
|||
else if (key2[0] === "o" && key2[1] === "n" && typeof value === "function") updateEvent(vnode, key2, value)
|
||||
else if (key2 === "style") updateStyle(element, old, value)
|
||||
else if (key2 in element && !isAttribute(key2) && 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" && key2 === "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" && key2 === "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" && key2 === "value" && old != null && vnode.dom.value == value) return
|
||||
if (key2 === "value") {
|
||||
var normalized0 = "" + value // eslint-disable-line 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.dom.value === normalized0 && vnode.dom === $doc.activeElement) return
|
||||
//setting select[value] to same value while having select open blinks select dropdown in Chrome
|
||||
if (vnode.tag === "select") {
|
||||
if (value === null) {
|
||||
if (vnode.dom.selectedIndex === -1 && vnode.dom === $doc.activeElement) return
|
||||
} else {
|
||||
if (old !== null && vnode.dom.value === normalized0 && vnode.dom === $doc.activeElement) return
|
||||
}
|
||||
}
|
||||
//setting option[value] to same value while having select open blinks select dropdown in Chrome
|
||||
if (vnode.tag === "option" && old != null && vnode.dom.value === normalized0) return
|
||||
}
|
||||
// If you assign an input type1 that is not supported by IE 11 with an assignment expression, an error0 will occur.
|
||||
if (vnode.tag === "input" && key2 === "type") {
|
||||
element.setAttribute(key2, value)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue