fix ie8 empty-text-node-in-input issue

This commit is contained in:
Leo Horie 2014-08-11 20:54:35 -04:00
parent 60939592f7
commit e60a9542b2
2 changed files with 17 additions and 3 deletions

View file

@ -685,6 +685,20 @@ function testMithril(mock) {
m.render(root, m("ul", [m("li", {key: 0}), m("li", {key: 1}), m("li", {key: 2}), m("li", {key: 3}), m("li", {key: 4}), m("li", {key: 5})]))
return root.childNodes[0].childNodes.map(function(n) {return n.key}).join("") == "012345"
})
test(function() {
//https://github.com/lhorie/mithril.js/issues/157
var root = mock.document.createElement("div")
m.render(root, m("input", {value: "a"}))
m.render(root, m("input", {value: "aa"}))
return root.childNodes[0].childNodes.length == 0
})
test(function() {
//https://github.com/lhorie/mithril.js/issues/157
var root = mock.document.createElement("div")
m.render(root, m("br", {class: "a"}))
m.render(root, m("br", {class: "aa"}))
return root.childNodes[0].childNodes.length == 0
})
//end m.render
//m.redraw