Skip to content

Click on "Open in new tab" control causes hyperlink creation UI popover to close  #25946

@getdave

Description

@getdave

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:

  1. Create new Post
  2. Add some text in a paragraph block
  3. Highlight some of the text and create a link.
  4. Now use the toggle control for "Open in new tab".
  5. 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

Screen Capture on 2020-10-08 at 09-27-05

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    [Feature] Link EditingLink components (LinkControl, URLInput) and integrations (RichText link formatting)[Type] BugAn existing feature does not function as intended

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions