You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using the HTML5 backend within the DndProvider anywhere on the page, event listeners for drag and drop events are attached to every HTML element within the page, not just the elements that are children of the DndProvider context.
Display reproduction and website loaded in step 2 on the same monitor, side by side
Click on one of the links from the website in step 2, and drag it into the input in the reproduction
Expected behavior
The URL that is dragged into the input would be pasted.
** Actual beavior**
Nothing happens, as an event listener that React DnD has attached to the input, prevents the event from propagating, and therefore prevents the URL from being pasted into the input
Screenshots
The follow screen recording has the React DnD Provider being rendered
Dragging.link.into.input.doesn.t.work.mp4
The following screen recording removes the React DnD Provider, to show the expected behaviour
Dragging.link.into.input.does.work.mp4
Additional context
I have tried passing options into the context, setting a rootElement element, however if the DnD context is being rendered at the same time that the whole application is being rendered, then on the first pass (the first time that DnD is run), the ref will be null, so DnD falls back to using window. On subsequent re-renders, the initial result has been cached, therefore it is re-used, so the rootElement stays as window
The text was updated successfully, but these errors were encountered:
Describe the bug
When using the HTML5 backend within the DndProvider anywhere on the page, event listeners for drag and drop events are attached to every HTML element within the page, not just the elements that are children of the DndProvider context.
Reproduction
Live Reproduction
Steps to reproduce the behavior:
Expected behavior
The URL that is dragged into the input would be pasted.
** Actual beavior**
Nothing happens, as an event listener that React DnD has attached to the input, prevents the event from propagating, and therefore prevents the URL from being pasted into the input
Screenshots
The follow screen recording has the React DnD Provider being rendered
Dragging.link.into.input.doesn.t.work.mp4
The following screen recording removes the React DnD Provider, to show the expected behaviour
Dragging.link.into.input.does.work.mp4
Additional context
I have tried passing
options
into the context, setting arootElement
element, however if the DnD context is being rendered at the same time that the whole application is being rendered, then on the first pass (the first time that DnD is run), the ref will benull
, so DnD falls back to usingwindow
. On subsequent re-renders, the initial result has been cached, therefore it is re-used, so therootElement
stays aswindow
The text was updated successfully, but these errors were encountered: