From 9f452cf3e694c0d7bbc8edeaedf982d016ed116a Mon Sep 17 00:00:00 2001 From: Dhruv Goel Date: Wed, 13 Jul 2022 19:17:27 -0700 Subject: [PATCH] fix(dnd): dont use classname Use getAttribute('class') instead of className. className can be an object as per web standards. --- 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') }