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).
This commit is contained in:
Adam Obuchowicz 2024-08-21 15:08:23 +02:00 committed by GitHub
parent 45a54b93cd
commit a9198c8d06
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 0 deletions

View File

@ -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 <kbd>tab</kbd> 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

View File

@ -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 ?? ''))"
/>