Fix : React DND broken when used within a NodeViewWrapper #5023
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Drag event doesn't work on components wrapped inside a NodeViewWrapper.
Please describe your changes
Currently, drag events are explicitly prevented on NodeView. This is also applied to NodeView children due to event propagation, thus preventing drag events on the components inside NodeView. This PR adds a check to ensure drag events are only prevented on the NodeView parent.
How did you accomplish your changes
Added event target check to ensure drag prevention on NodeView doesn't propagate to child components.
How have you tested your changes
Created a NodeView with a react dnd component using NodeViewWrapper. Drag works as expected on the react dnd component.
How can we verify your changes
Create a NodeView with draggable component and check if component can be dragged.
Remarks
[add any additional remarks here]
Checklist
Related issues
#5018