1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-27 03:57:21 +00:00

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
This commit is contained in:
Tobias Beer 2017-01-09 11:31:40 +01:00 committed by Jeremy Ruston
parent 2f21cbc971
commit d4db283d61

View File

@ -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