WordPress/gutenberg

Page jumps away when trying to edit an anchor link

開放

#72,505 建立於 2025年10月20日

 (13 則留言) (0 個反應) (1 位負責人)JavaScript (3,893 個分叉)batch import
Good First Issue[Feature] Link Editing[Status] In Progress[Type] Bug

倉庫指標

星標
 (9,607 顆星)
PR 合併指標
 (平均合併 12天 18小時) (30 天內合併 509 個 PR)

描述

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

貢獻者指南