Skip to content

Commit d089074

Browse files
zachallaunjosevalim
authored andcommitted
Focus search input immediately after keyboard shortcut
We were previously waiting for the `openSidebar()` promise to resolve, which resulted in lost keyboard input if you immediately started typing after pressing / or s.
1 parent 2a97a48 commit d089074

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

assets/js/keyboard-shortcuts.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,7 @@ function handleKeyUp (event) {
8383
function searchKeyAction (event) {
8484
closeModal()
8585
openSidebar()
86-
.then(() => {
87-
focusSearchInput()
88-
})
86+
focusSearchInput()
8987
}
9088

9189
function toggleHelpModal () {

0 commit comments

Comments
 (0)