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

BugFix: Prevent insertion of link of collapsed selection #5346

Open
wants to merge 14 commits into
base: main
Choose a base branch
from

Conversation

bhavyakaria
Copy link
Contributor

@bhavyakaria bhavyakaria commented Dec 6, 2023

fix: #5305

Copy link

vercel bot commented Dec 6, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
lexical ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 23, 2024 5:10am
lexical-playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 23, 2024 5:10am

@facebook-github-bot facebook-github-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 Dec 6, 2023
@bhavyakaria
Copy link
Contributor Author

@acywatson wanted your comments on the following behaviour, is this expected?

Current Behaviour

  • Select text
  • Click on insert link button
  • Default link with https:// gets created and then user has to click on edit icon to update the link

Shouldn't on clicking insert link button, it should be showing the edit view where user directly inserts the link and saves?Rather than having to clink on edit button to insert the link.

Attached the video for reference

Screen.Recording.2023-12-07.at.3.15.53.AM.mov

@acywatson
Copy link
Contributor

Shouldn't on clicking insert link button, it should be showing the edit view where user directly inserts the link and saves?Rather than having to clink on edit button to insert the link.

Yes - the way it currently works is the most annoying thing in the entire playground app to me. You are welcome to change it in a different PR.

@bhavyakaria bhavyakaria marked this pull request as draft December 7, 2023 07:14
ivailop7
ivailop7 previously approved these changes Dec 27, 2023
@ivailop7
Copy link
Collaborator

Leaving to @acywatson on how to proceed with this one.

@acywatson
Copy link
Contributor

Leaving to @acywatson on how to proceed with this one.

Looks like we have a failing test to fix. Make sure it's not causing a regression.

Copy link
Contributor

@acywatson acywatson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See comment re: test

@bhavyakaria
Copy link
Contributor Author

@acywatson a bit late but have fixed the UT 😅

@ivailop7
Copy link
Collaborator

ivailop7 commented Jul 3, 2024

This introduces an issue where if try to remove an existing link when my collapsed selection is in inside the link, it blocks the toggling off of the link.

@bhavyakaria
Copy link
Contributor Author

@ivailop7 thanks for pointing out, will fix it

@bhavyakaria
Copy link
Contributor Author

@ivailop7 Have fixed the delete link issue.

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. extended-tests Run extended e2e tests on a PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: Collapsed selections expand to nearest HTML tags on link insertion
4 participants