[Bug]: Dropcursor cannot take effect on the ReactNode #5817
Labels
Category: Open Source
The issue or pull reuqest is related to the open source packages of Tiptap.
Type: Bug
The issue or pullrequest is related to a bug
Affected Packages
core
Version(s)
2.9.1
Bug Description
First of all, I'm sorry that my English description was made through translation software, and I don't know whether you can understand it.
I customized a ReactNode and then introduced dropcursor. When I tried to drag the ReactNode, dropcursor did not work properly.
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>I tried to drag the img node and found that the dropcursor works normally.
So I set a breakpoint at the location where I listened to events. At this time, I tried to drag ReactNode and ImgNode respectively. I found that ReactNode only triggered dragstart event, while img can trigger dragstart and drag end events.
I continue to trace breakpoints and find that when I try to execute the
eventBelongsToView()
, theevent.defaultPrevented
of ReactNode becomes true, while theevent.defaultPrevented
of ImgNode is still false. It indicates that theevent.preventDefault()
was executed somewhere in the process, causing the ReactNode not to continue to trigger the dragend event.Browser Used
Chrome
Code Example URL
https://codesandbox.io/s/frosty-pare-dy3lrf?file=/src/CustomReactNode.js
Expected Behavior
I hope ReactNode can also make dropcursor work normally
Additional Context (Optional)
No response
Dependency Updates
The text was updated successfully, but these errors were encountered: