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:
parent
bcf427a3be
commit
30ad45caa1
5 changed files with 84 additions and 3 deletions
|
|
@ -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"])
|
||||
})
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue