mirror of
https://github.com/the1812/Bilibili-Evolved.git
synced 2025-11-04 21:22:45 +08:00
Merge branch 'preview-fixes'
This commit is contained in:
commit
ce4ee6223b
@ -46,9 +46,16 @@ export const loadKeyBindings = lodash.once((bindings: KeyBinding[]) => {
|
||||
}
|
||||
|
||||
// 忽略其他可聚焦元素
|
||||
const hasElementFocus = !([document.body, null] as (Element | null)[]).includes(
|
||||
getActiveElement(),
|
||||
)
|
||||
const hasElementFocus = (() => {
|
||||
const activeElement = getActiveElement()
|
||||
if (([document.body, null] as (Element | null)[]).includes(activeElement)) {
|
||||
return false
|
||||
}
|
||||
if (activeElement instanceof HTMLMediaElement) {
|
||||
return false
|
||||
}
|
||||
return true
|
||||
})()
|
||||
if (
|
||||
(binding.action.ignoreFocus !== false || binding.action.ignoreTyping !== false) &&
|
||||
hasElementFocus
|
||||
|
||||
Loading…
Reference in New Issue
Block a user