-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Description
Describe the bug
When creating a link on a portion of text in a paragraph block you may wish for the link to open in a new tab. There is a control in the hyperlink creation popover UI which allows you to toggle this feature on/off. However, when it is clicked the hyperlink creation UI popover closes.
This is undesirable as you may wish to toggle this feature on/off several times or you may have made a mistake. In this case the fact that the UI disappears each time a change is made is quite frustrating. I assume this is due to a re-render of the LinkControl
component but I could be wrong.
To reproduce
Steps to reproduce the behavior:
- Create new Post
- Add some text in a paragraph block
- Highlight some of the text and create a link.
- Now use the toggle control for "Open in new tab".
- Notice how clicking/toggling the control will cause the link UI to disappear.
Expected behavior
The link creation UI should not close when the toggle control is interacted with. It should remain open until it is dismissed.
Screenshots
Editor version (please complete the following information):
- WordPress version: 5.5.1
- Does the website has Gutenberg plugin installed, or is it using the block editor that comes by default? Plugin
- If the Gutenberg plugin is installed, which version is it? 9.9.1
Desktop (please complete the following information):
- OS: MacOS
- Browser Chrome
- Version 85.0.4183.121 (Official Build) (64-bit)