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 UI Incorrectly Anchored when Newly Created #58325

Closed
jeryj opened this issue Jan 26, 2024 · 6 comments
Closed

Link UI Incorrectly Anchored when Newly Created #58325

jeryj opened this issue Jan 26, 2024 · 6 comments
Labels
[Feature] Link Editing Link components (LinkControl, URLInput) and integrations (RichText link formatting) [Type] Bug An existing feature does not function as intended

Comments

@jeryj
Copy link
Contributor

jeryj commented Jan 26, 2024

Description

Same bug as #58280, but the fix only works for existing links. When a link is created, and the popover remains open, it is fixed to a point on the screen and doesn't update its position to stay with the link.

Step-by-step reproduction instructions

  1. Add a link on a page with enough content to scroll the editor
  2. While the popover is still open from the initial link creation, scroll the page
  3. The popover will be fixed in a position on the page instead of staying near the newly created link.

Screenshots, screen recording, code snippet

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

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

@jeryj jeryj 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
@getdave
Copy link
Contributor

getdave commented Jan 26, 2024

@jeryj @draganescu @scruffian @richtabor I think we ought to roll back the recent Link control PRs. We can bring them back in a single PR which also fixes the bugs. The currently experience in trunk is too poor.

@jeryj
Copy link
Contributor Author

jeryj commented Jan 26, 2024

I think we should try to fix them up more before reverting. Which bugs are large enough that you want to revert for?

@getdave
Copy link
Contributor

getdave commented Jan 31, 2024

I can still replicate the bugs that were uncovered last week in trunk. Gutenberg 17.6.0 is released today and the bugs will then be in a release of the Plugin which is not ideal.

Moreover, 9th Feb is Gutenberg 17.7.0 RC which is the final release of the Plugin that will land in WP 6.5.

I would suggest that unless the fix is imminent then we should:

  • revert the changes that caused the bugs
  • raising a new PR which reintroduces the changes and includes any necessary bug fixes
  • only ship that PR if you can fix the bugs by Gutenberg 17.7.0 RC on 9th February

What do you think?

@draganescu
Copy link
Contributor

draganescu commented Jan 31, 2024

@jeryj
Copy link
Contributor Author

jeryj commented Jan 31, 2024

I can still replicate the bugs that were uncovered last week in trunk

Before we can decide on a revert, I think we need to decide on:

  • Which specific bugs are considered big enough to revert
  • What the root cause of these bugs are (is it fixed by reverting? Why?)
  • Is the overall state of the Link UI better or worse than it was previously

For example, I believe #58465 is caused by #47525 and was an issue before the Link UI PRs.

#58322 is also not a bug caused by the new Link UI, but is more apparent because of it. The root cause is:

  • In Firefox
  • If focus is within any popover,
  • a click happens on the same paragraph that the caret is in
  • the caret won't be moved to the new location on the first click

The same bug is there after reverting, but isn't as apparent because previously the link UI could be opened without focus within the popover. Now, we force focus in the popover if it's open, which is a better experience than before as the focus management is predictable.

Are there other bugs that have come up that we're considering reverting for?

@jeryj
Copy link
Contributor Author

jeryj commented Feb 14, 2024

Closed by #58900

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) [Type] Bug An existing feature does not function as intended
Projects
Development

No branches or pull requests

3 participants