revert workaround for #29 in favor of key-based solution

This commit is contained in:
Leo Horie 2014-09-21 21:24:15 -04:00
parent aa23da4fd1
commit d32dd4adf5
2 changed files with 1 additions and 26 deletions

View file

@ -167,26 +167,6 @@ function testMithril(mock) {
m.render(root, m("a", {config: m.route}, "test"))
return root.childNodes[0].childNodes[0].nodeValue === "test"
})
test(function() {
//https://github.com/lhorie/mithril.js/issues/29
var root = mock.document.createElement("div")
var list = [false, false]
m.render(root, list.reverse().map(function(flag, index) {
return m("input[type=checkbox]", {onclick: m.withAttr("checked", function(value) {list[index] = value}), checked: flag})
}))
mock.document.activeElement = root.childNodes[0]
root.childNodes[0].checked = true
root.childNodes[0].onclick({currentTarget: {checked: true}})
m.render(root, list.reverse().map(function(flag, index) {
return m("input[type=checkbox]", {onclick: m.withAttr("checked", function(value) {list[index] = value}), checked: flag})
}))
mock.document.activeElement = null
return root.childNodes[0].checked === false && root.childNodes[1].checked === true
})
test(function() {
//https://github.com/lhorie/mithril.js/issues/44 (1)
var root = mock.document.createElement("div")