mirror of
https://github.com/ZiuChen/ClipboardManager.git
synced 2025-09-27 13:53:21 +08:00
fix: 键盘事件触发也会focus 搜索框聚焦统一调用window.focus方法
This commit is contained in:
@@ -176,6 +176,8 @@ const paste = () => {
|
||||
}
|
||||
}
|
||||
|
||||
const focus = () => document.querySelector('.clip-search input')?.focus()
|
||||
|
||||
const db = new DB(DBPath)
|
||||
db.init()
|
||||
|
||||
@@ -192,8 +194,11 @@ watchClipboard(db, (item) => {
|
||||
db.addItem(item)
|
||||
})
|
||||
|
||||
utools.onPluginEnter(() => focus())
|
||||
|
||||
window.db = db
|
||||
window.copy = copy
|
||||
window.paste = paste
|
||||
window.openFile = utools.shellOpenPath
|
||||
window.getIcon = utools.getFileIcon
|
||||
window.focus = focus
|
||||
|
Reference in New Issue
Block a user