From 2332f121260bc772f4a709f6334bd9bb96c05e69 Mon Sep 17 00:00:00 2001 From: Dhruv Goel Date: Fri, 15 Jul 2022 10:43:44 -0700 Subject: [PATCH] fix(dnd): dont use classname (#2232) allow for className object usage --- src/addons/dragAndDrop/EventWrapper.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/addons/dragAndDrop/EventWrapper.js b/src/addons/dragAndDrop/EventWrapper.js index b9d4e111a..34ac2e66d 100644 --- a/src/addons/dragAndDrop/EventWrapper.js +++ b/src/addons/dragAndDrop/EventWrapper.js @@ -42,7 +42,9 @@ class EventWrapper extends React.Component { // hack: because of the way the anchors are arranged in the DOM, resize // anchor events will bubble up to the move anchor listener. Don't start // move operations when we're on a resize anchor. - const isResizeHandle = e.target.className.includes('rbc-addons-dnd-resize') + const isResizeHandle = e.target + .getAttribute('class') + ?.includes('rbc-addons-dnd-resize') if (!isResizeHandle) this.context.draggable.onBeginAction(this.props.event, 'move') }