WordPress/gutenberg

Page jumps away when trying to edit an anchor link

Open

#72505 opened on Oct 20, 2025

View on GitHub
 (13 comments) (0 reactions) (1 assignee)JavaScript (9,607 stars) (3,893 forks)batch import
Good First Issue[Feature] Link Editing[Status] In Progress[Type] Bug

Description

Description

Anchor links remain active in the Gutenberg editor, which makes them very hard to edit.

When you click an anchor link intending to change its URL, you will lose your position on the page.

Allowing anchors to jump appears to be deliberate but is very confusing and not great when trying to edit.

Step-by-step reproduction instructions

  1. In the Gutenberg editor, add several paragraphs of text, enough to fill up at least the height of the screen. Select some text near the bottom, click the link button, and enter a URL of #.

  2. Later, click on the text, expecting to see the usual popup where you can edit the link.

  3. Note that while the popup is triggered, you won't see it at all; instead you have been scrolled to the very top of the page, and have to scroll all of the way back down to find the link that you were trying to edit.

Screenshots, screen recording, code snippet

No response

Environment info

Tested on a fresh installation of WordPress 6.8.3 and default themes, no Gutenberg plugin

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

Please confirm which theme type you used for testing.

  • Block
  • Classic
  • Hybrid (e.g. classic with theme.json)
  • Not sure

Contributor guide