From a6f6db40d9b894370653fb44ff5ab8fe798e4d53 Mon Sep 17 00:00:00 2001 From: Jeremy Ruston Date: Sun, 15 Mar 2020 14:23:10 +0000 Subject: [PATCH] Revert "Fix test for needing to update text editor DOM" This reverts commit a65ec87c53fceee69dac87d1051b46ebb7aaaf75. --- core/modules/editor/engines/framed.js | 2 +- core/modules/editor/engines/simple.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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