refactor(node): dont select when button inside node is clicked
This commit is contained in:
2
dist/ReactFlow.esm.js
vendored
2
dist/ReactFlow.esm.js
vendored
@@ -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,
|
||||
|
||||
2
dist/ReactFlow.js
vendored
2
dist/ReactFlow.js
vendored
@@ -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,
|
||||
|
||||
@@ -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) => ({
|
||||
|
||||
Reference in New Issue
Block a user