mirror of
https://github.com/He4eT/tabswitcher.git
synced 2026-05-05 01:17:23 +00:00
pages/search: improve usability
This commit is contained in:
parent
9c24d16071
commit
dbb7724253
3 changed files with 16 additions and 10 deletions
|
|
@ -80,11 +80,9 @@ export const attachInputHandlers = (store) => {
|
|||
searchBox.addEventListener('keydown', (e) => {
|
||||
if (e.key === 'Enter') {
|
||||
let visibleTabs = store.getCurrentState().results
|
||||
if (visibleTabs.length === 1) {
|
||||
if (visibleTabs.length > 0) {
|
||||
const tabId = visibleTabs[0].obj.id
|
||||
switchToTab(tabId)
|
||||
} else {
|
||||
actionbox.focus()
|
||||
}
|
||||
}
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue