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: Line break inside link node appends text to the end of the current paragraph #6628

Open
micnic opened this issue Sep 12, 2024 · 0 comments · May be fixed by #6631
Open

Bug: Line break inside link node appends text to the end of the current paragraph #6628

micnic opened this issue Sep 12, 2024 · 0 comments · May be fixed by #6631

Comments

@micnic
Copy link

micnic commented Sep 12, 2024

When inserting a line break by pressing Enter while the cursor is inside a link the part of the link that is at the end will go to the end of the current paragraph and not to the start of the next line. Follow the steps to reproduce for an example or see the attached video.

Lexical version: 0.17.1

Steps To Reproduce

  1. Have the text Some text. https://www.google.com Some other text. in the editor https://playground.lexical.dev/
  2. Set the cursor inside the link, for example between c and o: https://www.google.c|om
  3. Press ENTER
Inregistrare.ecran.din.2024-09-12.la.16.26.06.mov

Link to code example:

The current behavior

After following the steps to reproduce we have 3 paragraphs with the following content:

Some text. https://www.google.c
 Some other text.
om

The expected behavior

It was expected to have only 2 paragraphs with the content:

Some text. https://www.google.c
om Some other text.

Impact of fix

  • Low severity
  • Any user that uses link nodes may be affected
strdr4605 added a commit to Planable/lexical that referenced this issue Sep 13, 2024
@strdr4605 strdr4605 linked a pull request Sep 13, 2024 that will close this issue
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 a pull request may close this issue.

1 participant