mirror of
https://github.com/pawelmalak/flame.git
synced 2026-03-08 05:23:11 +08:00
Added new search bar shortcut. Fixed bug with forms still being visible after logout. Fixed bug with config fetching order
This commit is contained in:
@@ -45,12 +45,17 @@ export const SearchBar = (props: Props): JSX.Element => {
|
||||
|
||||
if (key === 'Escape') {
|
||||
clearSearch();
|
||||
} else if (document.activeElement !== inputRef.current) {
|
||||
if (key === '`') {
|
||||
inputRef.current.focus();
|
||||
clearSearch();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
window.addEventListener('keydown', keyOutsideFocus);
|
||||
window.addEventListener('keyup', keyOutsideFocus);
|
||||
|
||||
return () => window.removeEventListener('keydown', keyOutsideFocus);
|
||||
return () => window.removeEventListener('keyup', keyOutsideFocus);
|
||||
}, []);
|
||||
|
||||
const clearSearch = () => {
|
||||
|
||||
Reference in New Issue
Block a user