Skip to content

Conversation

felzsoca
Copy link

@felzsoca felzsoca commented Aug 12, 2025

Description

inline element selection (multiple)
prefer text node end over next node start (TODO should detail out separately for collapsed selection?)

Describe the changes in this pull request

Closes #7580 (TODO double-check and create bugs for the other issues...)

Test plan

Before

Insert relevant screenshots/recordings/automated-tests

After

Insert relevant screenshots/recordings/automated-tests

Copy link

vercel bot commented Aug 12, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
lexical Ready Ready Preview Comment Aug 19, 2025 4:37pm
lexical-playground Ready Ready Preview Comment Aug 19, 2025 4:37pm

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Aug 12, 2025
@felzsoca felzsoca changed the title [lexical-offset] Bug Fix: inline element selection, match user input observed behaviour for with text nodes [lexical-offset] Bug Fix: inline element selection, match user input observed behaviour with text nodes Aug 12, 2025
@etrepum
Copy link
Collaborator

etrepum commented Aug 12, 2025

The most important thing to do when adding fixes here would be to add tests that show what the fixes are supposed to do, confirm that they work, and ensure that they continue to work as the rest of the code changes.

@felzsoca
Copy link
Author

Hi @etrepum,

thanks for checking the PR! You are right, the PR is not there yet, hence I created just as a draft one.
I started to add unit tests locally, but as there was none before for this package, it takes a little longer. I also add some nice helpers via which it is easier to arrange the tests.
I plan to have multiple commits with different test cases, just would like to have an 'acceptable' first one as I already had an idea for arranging nodes. Will get back to it tomorrow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: @lexical/offset makes invalid selection if offset points to inline node
2 participants