From a9198c8d066edf85d451988bb43d2b6fbdf52bbe Mon Sep 17 00:00:00 2001 From: Adam Obuchowicz Date: Wed, 21 Aug 2024 15:08:23 +0200 Subject: [PATCH] Make tab accept the text input (#10857) Fixes #10855 Added handler for `tab` key. We cannot accept input on blur, as sometimes it should not be accepted (as when user clicks at drop-down option where text widget was providing filtering pattern). --- CHANGELOG.md | 3 +++ app/gui2/src/components/GraphEditor/widgets/WidgetText.vue | 1 + 2 files changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index fac2beb1109..1e4597bbf04 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,10 +9,13 @@ code). After picking any suggestion with Tab or new button the mode is switched to "code editing", where visualization preview is displayed instead. - [Drilldown for XML][10824] +- [Fixed issue where switching edited widget with tab key did not + updated actual code][10857] [10774]: https://github.com/enso-org/enso/pull/10774 [10814]: https://github.com/enso-org/enso/pull/10814 [10824]: https://github.com/enso-org/enso/pull/10824 +[10857]: https://github.com/enso-org/enso/pull/10857 #### Enso Standard Library diff --git a/app/gui2/src/components/GraphEditor/widgets/WidgetText.vue b/app/gui2/src/components/GraphEditor/widgets/WidgetText.vue index 022ce06e252..7f08ac0d9a2 100644 --- a/app/gui2/src/components/GraphEditor/widgets/WidgetText.vue +++ b/app/gui2/src/components/GraphEditor/widgets/WidgetText.vue @@ -103,6 +103,7 @@ export const widgetDefinition = defineWidget( v-model="editedContents" autoSelect @keydown.enter.stop="accepted" + @keydown.tab.stop="accepted" @focusin="editing.start()" @input="editing.edit(makeLiteralFromUserInput($event ?? ''))" />