Permalink
Browse files

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
  • Loading branch information...
1 parent 2f21cbc commit d4db283d614f2d877fed718cb206c10ef87fb0ed @tobibeer tobibeer committed with Jan 9, 2017
Showing with 1 addition and 1 deletion.
  1. +1 −1 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

0 comments on commit d4db283

Please sign in to comment.