Update useKeyboardShortcuts.tsx (#1181)

This commit is contained in:
Steve Ruiz 2023-04-01 06:29:06 +01:00 committed by GitHub
parent 784b4503aa
commit 9967b281be
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -10,7 +10,6 @@ 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]