Skip to content

Commit c439203

Browse files
author
Jonathan Felchlin
committed
Fixing textarea value changes not showing
1 parent bcca7e5 commit c439203

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

diffDOM.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -707,7 +707,9 @@
707707
objNode.attributes[attribute.name] = attribute.value;
708708
}
709709
}
710-
if (aNode.childNodes && aNode.childNodes.length > 0) {
710+
if (objNode.nodeName === 'TEXTAREA') {
711+
objNode.value = aNode.value;
712+
} else if (aNode.childNodes && aNode.childNodes.length > 0) {
711713
objNode.childNodes = [];
712714
nodeArray = Array.prototype.slice.call(aNode.childNodes);
713715
length = nodeArray.length;
@@ -1110,10 +1112,6 @@
11101112
break;
11111113
case this._const.modifyTextElement:
11121114
node.data = diff[this._const.newValue];
1113-
1114-
if (parentNode.nodeName === 'TEXTAREA') {
1115-
parentNode.value = diff[this._const.newValue];
1116-
}
11171115
break;
11181116
case this._const.modifyValue:
11191117
node.value = diff[this._const.newValue];

0 commit comments

Comments
 (0)