bugfix: utils file

This commit is contained in:
Braks
2021-07-09 20:00:39 +02:00
parent c4917e2359
commit e400b48e9c
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -3,7 +3,7 @@ import { Dimensions, XYPosition, NodeExtent } from '../types';
export const isInputDOMNode = (e: MouseEvent | /* DraggableEvent | */ KeyboardEvent): boolean => {
const target = e.target as HTMLElement;
return ['INPUT', 'SELECT', 'TEXTAREA', 'BUTTON'].includes(target?.nodeName) || target.hasAttribute('contenteditable');
return ['INPUT', 'SELECT', 'TEXTAREA', 'BUTTON'].includes(target.nodeName) || target.hasAttribute('contenteditable');
};
export const getDimensions = (node: HTMLDivElement): Dimensions => ({