Open greatislander opened 5 years ago
This works for me if the anchor has content. What's a good use case of adding on empty anchor?
Confirmed that this happens in latest development version of Gutenberg, so removing Needs Testing
.
I'm not 100% sure that it's a bug, though, as it's generally not expected that one can insert arbitrary HTML (including an empty <a>
tag) into any block. The only use-case for an empty anchor that I can think of is inserting a page jump e.g. <a name="you-can-link-to-here"></a>
. Using an HTML block is workaround for this.
Describe the bug When editing a paragraph containing an anchor (e.g. ) in Firefox (64.0.2, macOS 10.14.2), pressing the delete key to delete any text in the paragraph removes the anchor, regardless of the position of the cursor in relation to the anchor within the paragraph. This affects both classic blocks and paragraph blocks.
To Reproduce Steps to reproduce the behavior:
Expected behavior The anchor should be unaffected unless the cursor directly follows the anchor icon when the delete key is pressed.
Screenshots https://cl.ly/24307cf3c26c
Desktop (please complete the following information):
Additional context