feat(core,nodes): implement a11y in nodes
Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
@@ -2,12 +2,11 @@ import type { Ref } from 'vue'
|
||||
import type { KeyFilter, MaybeRef } from '@vueuse/core'
|
||||
import { isBoolean, isFunction } from '@vueuse/core'
|
||||
|
||||
function isInputDOMNode(event: KeyboardEvent): boolean {
|
||||
export function isInputDOMNode(event: KeyboardEvent): boolean {
|
||||
const target = (event.composedPath?.()?.[0] || event.target) as HTMLElement
|
||||
|
||||
// we want to be able to do a multi selection event if we are in an input field
|
||||
if (event.ctrlKey || event.metaKey || event.shiftKey) return false
|
||||
|
||||
const hasAttribute = isFunction(target.hasAttribute) ? target.hasAttribute('contenteditable') : false
|
||||
|
||||
const closest = isFunction(target.closest) ? target.closest('.nokey') : null
|
||||
|
||||
Reference in New Issue
Block a user