From 29fdd77d7b4ac3bbb9faae73b0932183d48ae9a6 Mon Sep 17 00:00:00 2001 From: Alex Grozav Date: Thu, 14 Apr 2022 10:30:31 +0300 Subject: [PATCH] fix(ui): Reset text-edit input value when pressing esc key to have matching input values (#3098) --- packages/editor-ui/src/components/TextEdit.vue | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/editor-ui/src/components/TextEdit.vue b/packages/editor-ui/src/components/TextEdit.vue index 6a4de8a450..7ee367556d 100644 --- a/packages/editor-ui/src/components/TextEdit.vue +++ b/packages/editor-ui/src/components/TextEdit.vue @@ -4,7 +4,7 @@
-
+
@@ -35,6 +35,13 @@ export default Vue.extend({ this.$emit('valueChanged', value); }, + onKeyDownEsc () { + // Resetting input value when closing the dialog, required when closing it using the `Esc` key + this.tempValue = this.value; + + this.closeDialog(); + }, + closeDialog () { // Handle the close externally as the visible parameter is an external prop // and is so not allowed to be changed here.