diff --git a/core/modules/editor/engines/framed.js b/core/modules/editor/engines/framed.js index 6e7da24da..d792309ed 100644 --- a/core/modules/editor/engines/framed.js +++ b/core/modules/editor/engines/framed.js @@ -106,7 +106,7 @@ Set the text of the engine if it doesn't currently have focus */ FramedEngine.prototype.setText = function(text,type) { if(!this.domNode.isTiddlyWikiFakeDom) { - if(this.domNode.ownerDocument.activeElement !== this.domNode) { + if(this.domNode.value !== text) { this.domNode.value = text; } // Fix the height if needed diff --git a/core/modules/editor/engines/simple.js b/core/modules/editor/engines/simple.js index bb77893d7..b94934810 100644 --- a/core/modules/editor/engines/simple.js +++ b/core/modules/editor/engines/simple.js @@ -67,7 +67,7 @@ Set the text of the engine if it doesn't currently have focus */ SimpleEngine.prototype.setText = function(text,type) { if(!this.domNode.isTiddlyWikiFakeDom) { - if(this.domNode.ownerDocument.activeElement !== this.domNode || text === "") { + if(this.domNode.value !== text) { this.domNode.value = text; } // Fix the height if needed