mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-26 09:50:33 +01:00
fix(useShortcuts): include contenteditable="plaintext-only" elements in usingInput (#1159)
This commit is contained in:
@@ -9,7 +9,9 @@ export const _useShortcuts = () => {
|
|||||||
|
|
||||||
const activeElement = useActiveElement()
|
const activeElement = useActiveElement()
|
||||||
const usingInput = computed(() => {
|
const usingInput = computed(() => {
|
||||||
const usingInput = !!(activeElement.value?.tagName === 'INPUT' || activeElement.value?.tagName === 'TEXTAREA' || activeElement.value?.contentEditable === 'true')
|
const contentEditable = activeElement.value?.contentEditable
|
||||||
|
|
||||||
|
return !!(activeElement.value?.tagName === 'INPUT' || activeElement.value?.tagName === 'TEXTAREA' || contentEditable === 'true' || contentEditable === 'plaintext-only')
|
||||||
|
|
||||||
if (usingInput) {
|
if (usingInput) {
|
||||||
return ((activeElement.value as any)?.name as string) || true
|
return ((activeElement.value as any)?.name as string) || true
|
||||||
|
|||||||
Reference in New Issue
Block a user