From d4db283d614f2d877fed718cb206c10ef87fb0ed Mon Sep 17 00:00:00 2001 From: Tobias Beer Date: Mon, 9 Jan 2017 11:31:40 +0100 Subject: [PATCH] Refresh simple editor when empty text, e.g. hitting ENTER (#2702) fixes #2592, missing bit of deleting the field for adding a new tag in edit-mode also fix for: https://groups.google.com/forum/?fromgroups=#!topic/tiddlywiki/L6Z7gSvBWjw --- core/modules/editor/engines/simple.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/modules/editor/engines/simple.js b/core/modules/editor/engines/simple.js index 900d95276..62bcf08b5 100644 --- a/core/modules/editor/engines/simple.js +++ b/core/modules/editor/engines/simple.js @@ -64,7 +64,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) { + if(this.domNode.ownerDocument.activeElement !== this.domNode || text === "") { this.domNode.value = text; } // Fix the height if needed