Fix #1771 and probably others (#2286)

This is *super* subtle, and IMHO Chrome did exactly the wrong thing
here.
This commit is contained in:
Isiah Meadows 2018-11-14 15:35:00 -05:00 committed by GitHub
parent 76e585c523
commit 4f68984f2f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 40 additions and 0 deletions

View file

@ -324,4 +324,16 @@ 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)
})
})