From 5ad5dfffd162b5bd40bb1433a45718c883383a21 Mon Sep 17 00:00:00 2001 From: abakkk Date: Thu, 11 Mar 2021 09:32:22 +0100 Subject: [PATCH] not to erase the text on Escape key pressed Related to #60. --- area.js | 4 ---- 1 file changed, 4 deletions(-) diff --git a/area.js b/area.js index f368a76..80ce3cf 100644 --- a/area.js +++ b/area.js @@ -845,9 +845,6 @@ var DrawingArea = new Lang.Class({ this.textEntry.clutterText.set_single_line_mode(false); this.textEntry.clutterText.set_activatable(false); - this.textEntry.clutterText.connect('activate', (clutterText) => { - this._stopWriting(); - }); let showCursorOnPositionChanged = true; this.textEntry.clutterText.connect('text-changed', clutterText => { @@ -868,7 +865,6 @@ var DrawingArea = new Lang.Class({ this.textEntry.clutterText.connect('key-press-event', (clutterText, event) => { if (event.get_key_symbol() == Clutter.KEY_Escape) { - this.currentElement.text = ""; this._stopWriting(); return Clutter.EVENT_STOP; }