Merge remote-tracking branch 'origin/next' into components
This commit is contained in:
commit
114ebec22f
3 changed files with 10 additions and 5 deletions
|
|
@ -19,7 +19,7 @@
|
||||||
[class*=',12)'] {width:100%;}
|
[class*=',12)'] {width:100%;}
|
||||||
}
|
}
|
||||||
|
|
||||||
html {background:#999;color:#222;font:14px Helvetica;}
|
html {background:#999;color:#222;font:14px/1.4 Helvetica;}
|
||||||
html,body {margin:0;padding:0;}
|
html,body {margin:0;padding:0;}
|
||||||
header,footer {background:#999;}
|
header,footer {background:#999;}
|
||||||
nav {text-align:right;}
|
nav {text-align:right;}
|
||||||
|
|
|
||||||
|
|
@ -304,7 +304,7 @@ var m = (function app(window, undefined) {
|
||||||
configs.push(callback(data, [node, !isNew, context, cached]))
|
configs.push(callback(data, [node, !isNew, context, cached]))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (typeof dataType != FUNCTION) {
|
else if (typeof data != FUNCTION) {
|
||||||
//handle text nodes
|
//handle text nodes
|
||||||
var nodes;
|
var nodes;
|
||||||
if (cached.nodes.length === 0) {
|
if (cached.nodes.length === 0) {
|
||||||
|
|
@ -380,7 +380,7 @@ var m = (function app(window, undefined) {
|
||||||
//handle cases that are properties (but ignore cases where we should use setAttribute instead)
|
//handle cases that are properties (but ignore cases where we should use setAttribute instead)
|
||||||
//- list and form are typically used as strings, but are DOM element references in js
|
//- list and form are typically used as strings, but are DOM element references in js
|
||||||
//- when using CSS selectors (e.g. `m("[style='']")`), style is used as a string, but it's an object in js
|
//- when using CSS selectors (e.g. `m("[style='']")`), style is used as a string, but it's an object in js
|
||||||
else if (attrName in node && !(attrName === "list" || attrName === "style" || attrName === "form" || attrName === "type")) {
|
else if (attrName in node && !(attrName === "list" || attrName === "style" || attrName === "form" || attrName === "type" || attrName === "width" || attrName === "height")) {
|
||||||
//#348 don't set the value if not needed otherwise cursor placement breaks in Chrome
|
//#348 don't set the value if not needed otherwise cursor placement breaks in Chrome
|
||||||
if (tag !== "input" || node[attrName] !== dataAttr) node[attrName] = dataAttr
|
if (tag !== "input" || node[attrName] !== dataAttr) node[attrName] = dataAttr
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1243,6 +1243,11 @@ function testMithril(mock) {
|
||||||
])
|
])
|
||||||
return root.childNodes.map(function(node) {return node.id}).join() == "div-1,div-3,div-2"
|
return root.childNodes.map(function(node) {return node.id}).join() == "div-1,div-3,div-2"
|
||||||
})
|
})
|
||||||
|
test(function() {
|
||||||
|
var root = mock.document.createElement("div")
|
||||||
|
m.render(root, m("div", function() {}))
|
||||||
|
return root.childNodes[0].childNodes.length == 0
|
||||||
|
})
|
||||||
//end m.render
|
//end m.render
|
||||||
|
|
||||||
//m.redraw
|
//m.redraw
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue