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]: NodeInputRules - When doc empty, inline node will be replacing whole block #4796

Open
1 of 2 tasks
PHillemans opened this issue Jan 17, 2024 · 1 comment
Open
1 of 2 tasks
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

@PHillemans
Copy link

PHillemans commented Jan 17, 2024

Which packages did you experience the bug in?

core

What Tiptap version are you using?

>= 2.1.4

What’s the bug you are facing?

Since this MR (2.1.4): #4341, InputPasteRules now always replace the whole block, which is fine for the one it was fixed for (HorizontalRule - a block node), but I've got a custom extension/node that is inline. Here it still inserts as if it's a block, and will thus replace the whole block (see example).

Nodes_HorizontalRule_React.Mozilla.Firefox.2024-01-17.08-46-32.mp4

What browser are you using?

Chrome

Code example

https://codepen.io/PHillemans/pen/jOJByXX?editors=1111

What did you expect to happen?

For inline Nodes I expect the cursor to also say in the same line (it should only replace the text, not also the entire P)

Anything to add? (optional)

I've seen the MR that caused this issue, and think I've already got a fix inside this PR: #4791

Please take a look and see what you think.

Did you update your dependencies?

  • Yes, I’ve updated my dependencies to use the latest version of all packages.

Are you sponsoring us?

  • Yes, I’m a sponsor. 💖
@PHillemans PHillemans 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 Jan 17, 2024
@PHillemans
Copy link
Author

Hey, following up here. Can anyone take a look into my PR to fix this issue: #4791?

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
Status: Triage open
Development

No branches or pull requests

1 participant