mirror of
https://github.com/ZiuChen/ClipboardManager.git
synced 2025-10-24 05:21:20 +08:00
fix: 键盘事件触发也会focus 搜索框聚焦统一调用window.focus方法
This commit is contained in:
@@ -143,9 +143,11 @@ onMounted(() => {
|
||||
const target = index === list.length - 1 ? list[0] : list[index + 1]
|
||||
updateShowList(target)
|
||||
} else if (isSearch) {
|
||||
document.querySelector('input').focus()
|
||||
window.focus()
|
||||
} else if (isExit) {
|
||||
filterText.value = ''
|
||||
} else {
|
||||
window.focus() // 其他键盘事件 直接聚焦搜索框
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user