aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/components/SearchModal.vue3
-rw-r--r--src/components/TileTree.vue4
2 files changed, 6 insertions, 1 deletions
diff --git a/src/components/SearchModal.vue b/src/components/SearchModal.vue
index 6163d88..7e32236 100644
--- a/src/components/SearchModal.vue
+++ b/src/components/SearchModal.vue
@@ -27,6 +27,9 @@ export default defineComponent({
this.$emit('search-node', tolNode);
}
},
+ focusInput(){
+ (this.$refs.searchInput as HTMLInputElement).focus();
+ },
},
mounted(){
(this.$refs.searchInput as HTMLInputElement).focus();
diff --git a/src/components/TileTree.vue b/src/components/TileTree.vue
index 859ce1e..e0992b1 100644
--- a/src/components/TileTree.vue
+++ b/src/components/TileTree.vue
@@ -277,6 +277,8 @@ export default defineComponent({
} else if (evt.key == 'F' && evt.ctrlKey){
if (!this.searchOpen){
this.onSearchIconClick();
+ } else {
+ this.$refs.searchModal.focusInput();
}
}
},
@@ -529,7 +531,7 @@ export default defineComponent({
</transition>
<transition name="fade">
<search-modal v-if="searchOpen" :layoutTree="layoutTree" :tolMap="tolMap" :options="componentOptions"
- @search-close="onSearchClose" @search-node="onSearchNode"/>
+ @search-close="onSearchClose" @search-node="onSearchNode" ref="searchModal"/>
</transition>
<transition name="fade">
<help-modal v-if="helpOpen" :options="componentOptions" @help-modal-close="onHelpModalClose"/>