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

Can't select linked and unlinked text #58465

Closed
draganescu opened this issue Jan 30, 2024 · 3 comments · Fixed by #58552
Closed

Can't select linked and unlinked text #58465

draganescu opened this issue Jan 30, 2024 · 3 comments · Fixed by #58552
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

@draganescu
Copy link
Contributor

Description

Using the mouse I can't select text that is unlinked and text that is linked.

Step-by-step reproduction instructions

  1. In a post add a longer paragraph
  2. In this paragraph add a link and then a few words apart another link
  3. try using the mouse to select text unlinked, from between the two links, to text linked

Screenshots, screen recording, code snippet

select-link.mp4

Environment info

No response

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

@draganescu draganescu 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 30, 2024
@jeryj
Copy link
Contributor

jeryj commented Jan 30, 2024

Debugging this. Here's what I'm encountering:

  • Begin highlighting off of anchored text
  • Highlight into anchored text
  • Once the highlight extends into anchored text, the selectionStart/End range from stops updating.
Screen.Recording.2024-01-30.at.1.54.45.PM.mov

@jeryj
Copy link
Contributor

jeryj commented Jan 30, 2024

Also, this is not link specific. If you use this with bolded text, it also happens. It seems to be a bug where anytime you highlight text and it crosses into a new tag <a>, <strong>, etc, it stops updating the selectionStart/End values.

@jeryj
Copy link
Contributor

jeryj commented Jan 30, 2024

I believe this issue was introduced by #47525.

I've been looking at it today, but don't quite understand how it all ties together and what a good fix might be.

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
None yet
Development

Successfully merging a pull request may close this issue.

3 participants