mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-10-05 02:10:45 +00:00
Fixed problem with firing our own DOM mutation events
This commit is contained in:
parent
9b145638ec
commit
2faa668717
@ -94,6 +94,10 @@ exports.macro = {
|
|||||||
if(this.dependencies.hasChanged(changes,this.tiddlerTitle)) {
|
if(this.dependencies.hasChanged(changes,this.tiddlerTitle)) {
|
||||||
// Don't refresh the editor if it contains the caret or selection
|
// Don't refresh the editor if it contains the caret or selection
|
||||||
if(!window.getSelection().containsNode(this.domNode, true)) {
|
if(!window.getSelection().containsNode(this.domNode, true)) {
|
||||||
|
// Remove the event handlers so they don't get triggered by the following DOM manipulations
|
||||||
|
for(var e in exports.macro.events) {
|
||||||
|
this.domNode.removeEventListener(e,this,false);
|
||||||
|
}
|
||||||
// Remove the previous content
|
// Remove the previous content
|
||||||
while(this.domNode.hasChildNodes()) {
|
while(this.domNode.hasChildNodes()) {
|
||||||
this.domNode.removeChild(this.domNode.firstChild);
|
this.domNode.removeChild(this.domNode.firstChild);
|
||||||
|
Loading…
Reference in New Issue
Block a user