Unbreak m.trust (#2516)

* Actually return the check from `maybeSetContentEditable`

Lots of code paths relied on it being a boolean. When I created the
abstraction, I apparently forgot to make sure it returned the result.

* Don't forget to copy instance state over

* Update changelog [skip ci]

* Fix changelog issue [skip ci]
This commit is contained in:
Isiah Meadows 2019-08-17 14:38:10 -04:00 committed by GitHub
parent bcf427a3be
commit 30ad45caa1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 84 additions and 3 deletions

View file

@ -81,4 +81,14 @@ o.spec("createHTML", function() {
o(vnode.dom.nextSibling.nodeName).equals("text")
o(vnode.dom.nextSibling.namespaceURI).equals("http://www.w3.org/2000/svg")
})
o("creates the dom correctly with a contenteditable parent", function() {
var div = {tag: "div", attrs: {contenteditable: true}, children: [{tag: "<", children: "<a></a>"}]}
render(root, div)
var tags = []
for (var i = 0; i < div.dom.childNodes.length; i++) {
tags.push(div.dom.childNodes[i].nodeName)
}
o(tags).deepEquals(["A"])
})
})