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) => {
|
(ignoreMenus = false) => {
|
||||||
const elm = ref.current
|
const elm = ref.current
|
||||||
if (ignoreMenus && (app.isMenuOpen || app.settings.keepStyleMenuOpen)) return true
|
if (ignoreMenus && (app.isMenuOpen || app.settings.keepStyleMenuOpen)) return true
|
||||||
|
elm?.focus()
|
||||||
return elm && (document.activeElement === elm || elm.contains(document.activeElement))
|
return elm && (document.activeElement === elm || elm.contains(document.activeElement))
|
||||||
},
|
},
|
||||||
[ref]
|
[ref]
|
||||||
|
|
Loading…
Reference in a new issue