-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Description
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:
- Add buttons block
- Add a link for
https://www.wordpress.org
- Hit
[ENTER]
without selecting an item - 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.