fix: user selection

deps: upgrade to latest revue-draggable
This commit is contained in:
Braks
2021-07-15 23:32:58 +02:00
parent c7fda830a6
commit 2f93c917e0
8 changed files with 493 additions and 241 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
import { Dimensions, XYPosition, NodeExtent } from '../types';
import { DraggableEvent } from '@braks/revue-draggable';
export const isInputDOMNode = (e: MouseEvent | DraggableEvent | KeyboardEvent): boolean => {
export const isInputDOMNode = (e: KeyboardEvent | DraggableEvent['event']): boolean => {
const target = e.target as HTMLElement;
return ['INPUT', 'SELECT', 'TEXTAREA', 'BUTTON'].includes(target.nodeName) || target.hasAttribute('contentEditable');
};