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

Link Control: Can't switch links in the same paragraph in Firefox #58322

Closed
scruffian opened this issue Jan 26, 2024 · 4 comments · Fixed by #58745
Closed

Link Control: Can't switch links in the same paragraph in Firefox #58322

scruffian opened this issue Jan 26, 2024 · 4 comments · Fixed by #58745
Assignees
Labels
[Feature] Link Editing Link components (LinkControl, URLInput) and integrations (RichText link formatting) [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended

Comments

@scruffian
Copy link
Contributor

In Firefox, when I have multiple links in the same paragraph I cannot easily switch between them using my mouse:

Jan-26-2024.10-25-41.mp4

This bug seems to only effect Firefox.

There is a potential fix here: #58317 (comment) though it doesn't work for me

@scruffian scruffian added [Type] Bug An existing feature does not function as intended [Feature] Link Editing Link components (LinkControl, URLInput) and integrations (RichText link formatting) labels Jan 26, 2024
@jeryj
Copy link
Contributor

jeryj commented Jan 26, 2024

The fix doesn't work for me either. It seems related to the click caret placement being handled on the editor. On Chrome, when you click a new link, it moves the text caret to the location you clicked. On Firefox, it leaves the caret where it was before, thinking you are still clicking on the previous location.

Notice how the caret does not move to the new clicked location in this video:

Screen.Recording.2024-01-26.at.11.54.33.AM.mov

@jeryj
Copy link
Contributor

jeryj commented Jan 26, 2024

I think this is a deeper bug, and not related to LinkControl. The same issue of the caret not being moved to the new selection happens when you close a popover from the Block Toolbar as well.

This video shows the caret, then clicking to open a popover in the block toolbar, then clicking a new spot in the same paragraph and the caret is not moved to the new location.

Screen.Recording.2024-01-26.at.1.05.19.PM.mov

@scruffian
Copy link
Contributor Author

scruffian commented Jan 29, 2024

This seems to NOT be a bug with Link Control - you can reproduce the same issue by opening the options menu for a block and then clicking inside the same paragraph

@scruffian
Copy link
Contributor Author

I've done some exploration here but I don't have a solution yet. The difference is that when you focus back into the paragraph in Firefox, the calculations inside applySelection don't think that the range is equal, whereas in Chrome it does.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Link Editing Link components (LinkControl, URLInput) and integrations (RichText link formatting) [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended
Projects
Development

Successfully merging a pull request may close this issue.

2 participants