diff --git a/core/modules/editor/engines/framed.js b/core/modules/editor/engines/framed.js index d792309ed..6e7da24da 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.value !== text) { + if(this.domNode.ownerDocument.activeElement !== this.domNode) { 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 b94934810..bb77893d7 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.value !== text) { + if(this.domNode.ownerDocument.activeElement !== this.domNode || text === "") { this.domNode.value = text; } // Fix the height if needed