From 8415485113436754a4ea352c0c2dfdf29f419c84 Mon Sep 17 00:00:00 2001 From: rtexelm Date: Thu, 29 Feb 2024 10:21:08 -0500 Subject: [PATCH 1/2] Edit parent div style transform3d --- superset-frontend/src/dashboard/components/dnd/DragDroppable.jsx | 1 + 1 file changed, 1 insertion(+) diff --git a/superset-frontend/src/dashboard/components/dnd/DragDroppable.jsx b/superset-frontend/src/dashboard/components/dnd/DragDroppable.jsx index 6a49f9887550f..1c0fdeb724682 100644 --- a/superset-frontend/src/dashboard/components/dnd/DragDroppable.jsx +++ b/superset-frontend/src/dashboard/components/dnd/DragDroppable.jsx @@ -77,6 +77,7 @@ const defaultProps = { const DragDroppableStyles = styled.div` ${({ theme }) => css` position: relative; + transform: translate3d(0, 0, 0); &.dragdroppable--dragging { opacity: 0.2; From 10306f60791e3b89c5e6e7e91abd5405bb94238e Mon Sep 17 00:00:00 2001 From: rtexelm Date: Thu, 29 Feb 2024 13:18:31 -0500 Subject: [PATCH 2/2] Add comment with link to react-dnd issue comment --- .../src/dashboard/components/dnd/DragDroppable.jsx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/superset-frontend/src/dashboard/components/dnd/DragDroppable.jsx b/superset-frontend/src/dashboard/components/dnd/DragDroppable.jsx index 1c0fdeb724682..92a3ab5636f31 100644 --- a/superset-frontend/src/dashboard/components/dnd/DragDroppable.jsx +++ b/superset-frontend/src/dashboard/components/dnd/DragDroppable.jsx @@ -77,6 +77,11 @@ const defaultProps = { const DragDroppableStyles = styled.div` ${({ theme }) => css` position: relative; + /* + Next line is a workaround for a bug in react-dnd where the drag + preview expands outside of the bounds of the drag source card, see: + https://github.com/react-dnd/react-dnd/issues/832#issuecomment-442071628 + */ transform: translate3d(0, 0, 0); &.dragdroppable--dragging {