pages/search: close on Esc

This commit is contained in:
He4eT 2024-01-21 20:39:05 +01:00
commit ad9f5312f3

View file

@ -45,7 +45,9 @@ export const attachInputHandlers = (store) => {
}) })
if (e.key === 'Escape') { if (e.key === 'Escape') {
searchBox.focus() document.activeElement === searchBox
? store.actions.closeCurrentTab()
: searchBox.focus()
} }
}) })