Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 7 additions & 19 deletions build/a-template.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,18 @@
* a-template:
* license: MIT (http://opensource.org/licenses/MIT)
* author: steelydylan
* version: 0.5.5
* version: 0.6.1
*
* ie-array-find-polyfill:
* license: MIT (http://opensource.org/licenses/MIT)
* author: Carlos Abdalla
* maintainers: abdalla <carlos.abdalla@msdev.com.br>
* homepage: https://github.com/abdalla/ie-array-find-polyfill#readme
* version: 1.1.0
*
* morphdom:
* license: MIT (http://opensource.org/licenses/MIT)
* author: Patrick Steele-Idem <pnidem@gmail.com>
* maintainers: mlrawlings <ml.rawlings@gmail.com>, pnidem <pnidem@gmail.com>
* homepage: https://github.com/patrick-steele-idem/morphdom#readme
* version: 2.3.3
* version: 2.3.1
*
* This header is generated by licensify (https://github.com/twada/licensify)
*/
Expand Down Expand Up @@ -263,17 +260,14 @@ var specialElHandlers = {
fromEl.value = newValue;
}

var firstChild = fromEl.firstChild;
if (firstChild) {
if (fromEl.firstChild) {
// Needed for IE. Apparently IE sets the placeholder as the
// node value and vise versa. This ignores an empty update.
var oldValue = firstChild.nodeValue;

if (oldValue == newValue || (!newValue && oldValue == fromEl.placeholder)) {
if (newValue === '' && fromEl.firstChild.nodeValue === fromEl.placeholder) {
return;
}

firstChild.nodeValue = newValue;
fromEl.firstChild.nodeValue = newValue;
}
},
SELECT: function(fromEl, toEl) {
Expand Down Expand Up @@ -584,10 +578,7 @@ function morphdomFactory(morphAttrs) {
isCompatible = true;
// Simply update nodeValue on the original node to
// change the text value
if (curFromNodeChild.nodeValue !== curToNodeChild.nodeValue) {
curFromNodeChild.nodeValue = curToNodeChild.nodeValue;
}

curFromNodeChild.nodeValue = curToNodeChild.nodeValue;
}
}

Expand Down Expand Up @@ -686,10 +677,7 @@ function morphdomFactory(morphAttrs) {
}
} else if (morphedNodeType === TEXT_NODE || morphedNodeType === COMMENT_NODE) { // Text or comment node
if (toNodeType === morphedNodeType) {
if (morphedNode.nodeValue !== toNode.nodeValue) {
morphedNode.nodeValue = toNode.nodeValue;
}

morphedNode.nodeValue = toNode.nodeValue;
return morphedNode;
} else {
// Text node to something else
Expand Down
Loading