fix textarea value updating
This commit is contained in:
parent
f4effe90ae
commit
061cb168e5
2 changed files with 13 additions and 2 deletions
|
|
@ -1,5 +1,14 @@
|
|||
## Change Log
|
||||
|
||||
[v0.1.15](/mithril/archive/v0.1.15) - maintenance
|
||||
|
||||
### Bug Fixes:
|
||||
|
||||
- `m.sync` now correctly passes arguments to resolver in same order as input arguments [#96](https://github.com/lhorie/mithril.js/issues/96)
|
||||
- updating textarea attributes updates its value correctly [#100](https://github.com/lhorie/mithril.js/issues/100)
|
||||
|
||||
---
|
||||
|
||||
[v0.1.14](/mithril/archive/v0.1.14) - maintenance
|
||||
|
||||
### News:
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ Mithril = m = new function app(window) {
|
|||
cached = {
|
||||
tag: data.tag,
|
||||
attrs: setAttributes(node, data.tag, data.attrs, {}, namespace),
|
||||
children: build(node, data.tag, data.children, cached.children, true, 0, data.attrs.contenteditable ? node : editable, namespace),
|
||||
children: data.children !== undefined ? build(node, data.tag, data.children, cached.children, true, 0, data.attrs.contenteditable ? node : editable, namespace) : undefined,
|
||||
nodes: [node]
|
||||
}
|
||||
parentElement.insertBefore(node, parentElement.childNodes[index] || null)
|
||||
|
|
@ -155,7 +155,9 @@ Mithril = m = new function app(window) {
|
|||
else if (attrName === "value" && tag === "input") {
|
||||
if (node.value !== dataAttr) node.value = dataAttr
|
||||
}
|
||||
else if (attrName in node && !(attrName == "list" || attrName == "style")) node[attrName] = dataAttr
|
||||
else if (attrName in node && !(attrName == "list" || attrName == "style")) {
|
||||
node[attrName] = dataAttr
|
||||
}
|
||||
else node.setAttribute(attrName, dataAttr)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue