parent
8f7d85b0c9
commit
4d579c50b6
5 changed files with 0 additions and 40 deletions
|
|
@ -673,13 +673,6 @@ module.exports = function($window) {
|
|||
if (child != null) onremove(child)
|
||||
}
|
||||
}
|
||||
// Chrome emits a `blur` event on children when they are removed,
|
||||
// but *before* they dereference their parent...
|
||||
// https://stackoverflow.com/questions/21926083/failed-to-execute-removechild-on-node#22934552
|
||||
// https://github.com/MithrilJS/mithril.js/issues/1771
|
||||
if (vnode.events != null && vnode.events.onblur != null) {
|
||||
vnode.dom.removeEventListener("blur", vnode.events, false)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -324,16 +324,4 @@ o.spec("event", function() {
|
|||
o(onevent.args[0].type).equals("transitionend")
|
||||
o(onevent.args[0].target).equals(div.dom)
|
||||
})
|
||||
|
||||
o("doesn't fire blur on removed nodes", function() {
|
||||
var spy = o.spy()
|
||||
var div = {tag: "div", attrs: {onblur: spy}}
|
||||
|
||||
render(root, [div])
|
||||
div.dom.focus()
|
||||
render(root, [])
|
||||
|
||||
o(spy.callCount).equals(0)
|
||||
o(onevent.callCount).equals(0)
|
||||
})
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue