1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-07-28 17:02:04 +03:00

Extracted keyboard nav. from dropdowns to share w/ search

This commit is contained in:
Dan Brown
2022-11-21 17:35:19 +00:00
parent e7e83a4109
commit 0e528986ab
5 changed files with 126 additions and 61 deletions

View File

@ -1,5 +1,6 @@
import {htmlToDom} from "../services/dom";
import {debounce} from "../services/util";
import {KeyboardNavigationHandler} from "../services/keyboard-navigation";
/**
* @extends {Component}
@ -37,7 +38,11 @@ class GlobalSearch {
this.input.setAttribute('autocomplete', 'on');
this.button.focus();
this.input.focus();
})
});
new KeyboardNavigationHandler(this.container, () => {
this.hideSuggestions();
});
}
/**