fix(useShortcuts): invalid code after #1159

This commit is contained in:
Benjamin Canac
2023-12-25 17:39:01 +01:00
parent 648eec31b9
commit 56e1fed373

View File

@@ -9,9 +9,10 @@ export const _useShortcuts = () => {
const activeElement = useActiveElement()
const usingInput = computed(() => {
const tagName = activeElement.value?.tagName
const contentEditable = activeElement.value?.contentEditable
return !!(activeElement.value?.tagName === 'INPUT' || activeElement.value?.tagName === 'TEXTAREA' || contentEditable === 'true' || contentEditable === 'plaintext-only')
const usingInput = !!(tagName === 'INPUT' || tagName === 'TEXTAREA' || contentEditable === 'true' || contentEditable === 'plaintext-only')
if (usingInput) {
return ((activeElement.value as any)?.name as string) || true