Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Dropcursor cannot take effect on the ReactNode #5817

Open
1 task done
JbfGod opened this issue Nov 8, 2024 · 1 comment
Open
1 task done

[Bug]: Dropcursor cannot take effect on the ReactNode #5817

JbfGod opened this issue Nov 8, 2024 · 1 comment
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

Comments

@JbfGod
Copy link

JbfGod commented Nov 8, 2024

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.
image
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() , the event.defaultPrevented of ReactNode becomes true, while the event.defaultPrevented of ImgNode is still false. It indicates that the event.preventDefault() was executed somewhere in the process, causing the ReactNode not to continue to trigger the dragend event.

image image image >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> image image image >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

录屏2024-11-08 15 34 23

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

  • Yes, I've updated all my dependencies.
@JbfGod JbfGod added 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 labels Nov 8, 2024
@ueberdosis ueberdosis deleted a comment from Manaskhurana Nov 20, 2024
@nperez0111
Copy link
Contributor

Would accept a contribution here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
None yet
Development

No branches or pull requests

2 participants