#380 empty value attr in option should show up

This commit is contained in:
Leo Horie 2014-12-08 11:47:27 -05:00
parent d05b903024
commit e453ec7ce3
2 changed files with 7 additions and 2 deletions

View file

@ -346,7 +346,7 @@ var m = (function app(window, undefined) {
//- 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")) {
//#348 don't set the value if not needed otherwise cursor placement breaks in Chrome
if (node[attrName] !== dataAttr) node[attrName] = dataAttr
if (attrName != "input" || node[attrName] !== dataAttr) node[attrName] = dataAttr
}
else node.setAttribute(attrName, dataAttr)
}