mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-07-04 19:12:51 +00:00
Fixed problem with insertBefore() method in fakedom
Was preventing refreshing of widget trees built against the fakedom.
This commit is contained in:
parent
6c1489fc2f
commit
3bcaab513d
@ -66,6 +66,7 @@ TW_Element.prototype.insertBefore = function(node,nextSibling) {
|
|||||||
var p = this.children.indexOf(nextSibling);
|
var p = this.children.indexOf(nextSibling);
|
||||||
if(p !== -1) {
|
if(p !== -1) {
|
||||||
this.children.splice(p,0,node);
|
this.children.splice(p,0,node);
|
||||||
|
node.parentNode = this;
|
||||||
} else {
|
} else {
|
||||||
this.appendChild(node);
|
this.appendChild(node);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user