From fe909b806c10c675c6d3585856bb7d41102b1aac Mon Sep 17 00:00:00 2001 From: Stefan Peters Date: Tue, 27 Sep 2022 09:40:00 +0200 Subject: [PATCH] MappingBrowser go to page: Select and focus input when shown (#387) --- src/components/MappingBrowserTable.vue | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/components/MappingBrowserTable.vue b/src/components/MappingBrowserTable.vue index 52a3ff00..647127b7 100644 --- a/src/components/MappingBrowserTable.vue +++ b/src/components/MappingBrowserTable.vue @@ -384,6 +384,7 @@ :target="`mappingBrowser-pagination-goToPage-${section.id}`" triggers="click" placement="bottomleft" + @shown="goToPagePopoverShown" @hide="popoverHide($event, `goToPage-${section.id}`)">

@@ -764,6 +765,13 @@ export default { this.$emit("pageChange", { registry: section.registry, page: this.goToPageValues[section.id], userInitiated: true }) this.$set(this.popoverShown, `goToPage-${section.id}`, false) }, + goToPagePopoverShown(event) { + const inputField = event.relatedTarget && event.relatedTarget.getElementsByTagName("input")[0] + if (inputField) { + inputField.focus() + inputField.select() + } + }, }, }