[Bug]: selectAll
causes an unexpected newline when pasting
#6165
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.11.0
Bug Description
When using the selectAll command and pasting content, an unexpected newline is inserted. This seems to be caused by the selectAll implementation, which sets the selection to AllSelection but does not handle the paste behavior properly.
Steps to Reproduce:
editor.commands.selectAll()
.2025-03-07.17.00.58.mov
Browser Used
Chrome
Code Example URL
No response
Expected Behavior
The pasted content should replace the selection without inserting an extra newline.
2025-03-07.17.02.54.mov
Additional Context (Optional)
The issue might stem from how AllSelection interacts with the transaction when pasting. It could be necessary to handle paste events explicitly or adjust the selection behavior.
This looks like an issue with the merged PRs and issues below.
#5900
#5516
Dependency Updates
The text was updated successfully, but these errors were encountered: