From 220bf0143c9ff584320e638a032cadb5cd3520ee Mon Sep 17 00:00:00 2001 From: abakkk Date: Wed, 6 Mar 2019 04:29:46 +0100 Subject: [PATCH] do not keep empty text elements when stopping writing --- draw.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/draw.js b/draw.js index 8644eab..72f34e8 100644 --- a/draw.js +++ b/draw.js @@ -279,7 +279,8 @@ var DrawingArea = new Lang.Class({ }, _stopWriting: function() { - this.elements.push(this.currentElement); + if (this.currentElement.text.length > 0) + this.elements.push(this.currentElement); this.currentElement = null; this._stopCursorTimeout(); this._redisplay();