fix: toggle focus click and kbd (#881)
This commit is contained in:
parent
b7231d2bd5
commit
7fce946428
1 changed files with 1 additions and 0 deletions
|
@ -10,6 +10,7 @@ export function useKeyboardShortcuts(ref: React.RefObject<HTMLDivElement>) {
|
|||
(ignoreMenus = false) => {
|
||||
const elm = ref.current
|
||||
if (ignoreMenus && (app.isMenuOpen || app.settings.keepStyleMenuOpen)) return true
|
||||
elm?.focus()
|
||||
return elm && (document.activeElement === elm || elm.contains(document.activeElement))
|
||||
},
|
||||
[ref]
|
||||
|
|
Loading…
Reference in a new issue