not to erase the text on Escape key pressed

Related to #60.
This commit is contained in:
abakkk 2021-03-11 09:32:22 +01:00
parent cb40739af7
commit 5ad5dfffd1
1 changed files with 0 additions and 4 deletions

View File

@ -845,9 +845,6 @@ var DrawingArea = new Lang.Class({
this.textEntry.clutterText.set_single_line_mode(false); this.textEntry.clutterText.set_single_line_mode(false);
this.textEntry.clutterText.set_activatable(false); this.textEntry.clutterText.set_activatable(false);
this.textEntry.clutterText.connect('activate', (clutterText) => {
this._stopWriting();
});
let showCursorOnPositionChanged = true; let showCursorOnPositionChanged = true;
this.textEntry.clutterText.connect('text-changed', clutterText => { 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) => { this.textEntry.clutterText.connect('key-press-event', (clutterText, event) => {
if (event.get_key_symbol() == Clutter.KEY_Escape) { if (event.get_key_symbol() == Clutter.KEY_Escape) {
this.currentElement.text = "";
this._stopWriting(); this._stopWriting();
return Clutter.EVENT_STOP; return Clutter.EVENT_STOP;
} }