diff --git a/dist/ReactFlow.esm.js b/dist/ReactFlow.esm.js index f2f5978a..7e40a1e4 100644 --- a/dist/ReactFlow.esm.js +++ b/dist/ReactFlow.esm.js @@ -8144,7 +8144,7 @@ Grid.displayName = 'Grid'; var isInputDOMNode = function (e) { var target = e.target; - return (e && target && ['INPUT', 'SELECT', 'TEXTAREA'].includes(target.nodeName)); + return e && target && ['INPUT', 'SELECT', 'TEXTAREA', 'BUTTON'].includes(target.nodeName); }; var getDimensions = function (node) { return ({ width: node.offsetWidth, diff --git a/dist/ReactFlow.js b/dist/ReactFlow.js index fba30b41..e7e50e94 100644 --- a/dist/ReactFlow.js +++ b/dist/ReactFlow.js @@ -8151,7 +8151,7 @@ Grid.displayName = 'Grid'; var isInputDOMNode = function (e) { var target = e.target; - return (e && target && ['INPUT', 'SELECT', 'TEXTAREA'].includes(target.nodeName)); + return e && target && ['INPUT', 'SELECT', 'TEXTAREA', 'BUTTON'].includes(target.nodeName); }; var getDimensions = function (node) { return ({ width: node.offsetWidth, diff --git a/src/utils/index.ts b/src/utils/index.ts index 111a5cf3..74f6f3d6 100644 --- a/src/utils/index.ts +++ b/src/utils/index.ts @@ -1,13 +1,9 @@ import { DraggableEvent } from 'react-draggable'; import { MouseEvent as ReactMouseEvent } from 'react'; -export const isInputDOMNode = ( - e: ReactMouseEvent | DraggableEvent | KeyboardEvent -) => { +export const isInputDOMNode = (e: ReactMouseEvent | DraggableEvent | KeyboardEvent) => { const target = e.target as HTMLElement; - return ( - e && target && ['INPUT', 'SELECT', 'TEXTAREA'].includes(target.nodeName) - ); + return e && target && ['INPUT', 'SELECT', 'TEXTAREA', 'BUTTON'].includes(target.nodeName); }; export const getDimensions = (node: HTMLDivElement) => ({