diff options
| author | Terry Truong <terry06890@gmail.com> | 2022-03-27 00:43:10 +1100 |
|---|---|---|
| committer | Terry Truong <terry06890@gmail.com> | 2022-03-27 00:43:10 +1100 |
| commit | 420734b0cc391b73b6f1a843accef34a510de10c (patch) | |
| tree | fb499b111094e1d4135b1af4494f0297a1ad2e00 /src/components/TileTree.vue | |
| parent | a9d783599e34572a87b1499ff58f19328698d69b (diff) | |
Make search shortcut re-focus input when search-bar is open
Diffstat (limited to 'src/components/TileTree.vue')
| -rw-r--r-- | src/components/TileTree.vue | 4 |
1 files changed, 3 insertions, 1 deletions
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"/> |
