From 265ed66d25d35be99ed0a6b1668dab9f246ed71e Mon Sep 17 00:00:00 2001 From: Fabio Di Stasio Date: Sun, 12 Sep 2021 11:55:16 +0200 Subject: [PATCH] feat: start search when typing with focus on the left bar --- .../components/WorkspaceExploreBar.vue | 23 ++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/src/renderer/components/WorkspaceExploreBar.vue b/src/renderer/components/WorkspaceExploreBar.vue index cf68ca3f..e6378fc7 100644 --- a/src/renderer/components/WorkspaceExploreBar.vue +++ b/src/renderer/components/WorkspaceExploreBar.vue @@ -5,6 +5,9 @@ ref="explorebar" class="workspace-explorebar column" :style="{width: localWidth ? localWidth+'px' : ''}" + tabindex="0" + @keypress="explorebarSearch" + @keydown="explorebarSearch" >
{{ connectionName }} @@ -30,6 +33,7 @@ -
+
1)// Prevent non-alphanumerics + return; + + this.$refs.searchInput.focus(); + }, resize (e) { const el = this.$refs.explorebar; let explorebarWidth = e.pageX - el.getBoundingClientRect().left; @@ -527,6 +544,10 @@ export default { position: relative; padding: 0; + &:focus { + outline: none; + } + .workspace-explorebar-header { width: 100%; padding: 0.3rem;