Link UI incorrectly anchored to "last" link within rich text contenteditable #58280
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
If you have multiple links within a block of rich text then the Link UI will be "anchor" to
the finalfirst link you clicked in the block.So if you click the first link in the block and then click on other links, the popover will continue to anchor to the first link. Similarly if you clicked the last link first, it would continue to anchor to that link.
It should be anchored to the link that triggers it. I suspect this is due to the way in which we recently changed the usage of
useAnchor
to cache the first position.gutenberg/packages/format-library/src/link/inline.js
Lines 208 to 215 in ecda32e
Screen.Capture.on.2024-01-25.at.20-41-55.mp4
The text was updated successfully, but these errors were encountered: