Hi everyone
,
I’m facing an issue using dnd-kit inside a Shopify App Bridge . The drag-and-drop functionality works perfectly outside the modal, but stops working when placed inside the modal.
Setup:- Framework: React (using @Shopify_77 /app-bridge-react)
-
DnD package: dnd-kit
-
Modal: from @Shopify_77 /app-bridge-react
"@dnd-kit/core": "^6.3.1",
"@dnd-kit/sortable": "^10.0.0",
"@dnd-kit/modifiers": "^9.0.0",
"@dnd-kit/utilities": "^3.2.2"
What I’ve tried:- Delaying the initialization of DndContext until after the modal is open (using setTimeout in useEffect)
-
Ensuring modal is fully mounted before rendering sortable items
-
Debugging pointer-events and z-index issues
-
Confirmed it works fine in a regular React component outside the modal
Observation:
I have to interact with some other part of the app (e.g. clicking a sidebar menu) before drag-and-drop starts working inside the modal. This makes me suspect some initialization or rendering timing issue within the App Bridge modal environment.
Has anyone else faced this issue or found a reliable workaround for drag-and-drop inside App Bridge modals?
Any help would be greatly appreciated ![]()