Skip to content

LinkControl - hitting enter triggers submit error in developer console #19634

@getdave

Description

@getdave

Describe the bug
When adding a link using LinkControl (eg: buttons block or navigation block) then adding a link using the suggestion list the form that the submit button is in is unmounted when submission
occurs, resulting in a warning

'Form submission canceled because the form is not connected'

...in Chrome.

This causes an error in both real world usage and also causing e2e tests to fail (eg: the ones in #19458).

To reproduce
Steps to reproduce the behavior:

  1. Add buttons block
  2. Add a link for https://www.wordpress.org
  3. Hit [ENTER] without selecting an item
  4. See error in console (as above).

Expected behavior
The console should not warn. Ideally, the suggestions wouldn't be implemented using submit buttons.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context

  • Please add the version of Gutenberg you are using in the description.
  • To report a security issue, please visit the WordPress HackerOne program: https://hackerone.com/wordpress.

Metadata

Metadata

Assignees

Labels

Good First IssueAn issue that's suitable for someone looking to contribute for the first time[Block] NavigationAffects the Navigation Block[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