Skip to content

Conversation

@lksoft
Copy link

@lksoft lksoft commented Sep 30, 2025

When a section of text is selected inside of a text node and then is dragged to another location in the editor, the text from the end of the original selection to the end of the paragraph is deleted when the move is performed. The reason is because when the undo state is being changed the resulting range (after the _getRangeAndRemoveBookmark()) is not used to reset the selection, which ends up selecting the rest of the paragraph and thus the move removes the whole selection. I made sure to only do this if the range comes from the selection, i.e. none was passed in.

Watch this in the video of the demo code, here:

ScreenFloat.Shot.of.Orion.on.2025-09-30.at.15-38-49.mov

@neilj
Copy link
Member

neilj commented Oct 9, 2025

Thanks. I've used your fix but added it as commit b1ca8bc as I needed to tweak a few things to match the project's code style and builds should be separate to the commits making changes to the source.

@neilj neilj closed this Oct 9, 2025
@lksoft lksoft deleted the fix-internal-drag-drop branch October 9, 2025 13:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants