Description
Recently we've noticed that the Interactivity API closes the mobile modal when clicking anywhere on the screen except inside the modal. This prevents several things when working on the front-ends of our sites.
We work primarily using Firefox for development, and the bug seems to be here and in the latest version of Chrome.
Issue:
You cannot inspect the modal or items in it. Since the Interactivity API removes the has-modal-open class on the html element.
Step-by-step reproduction instructions
- Go to https://2024.wordpress.net/ and open your web inspector
- Set your browser width to a breakpoint where the menu button appears
- Inspect a menu-item
- The modal closes (the class "has-modal-open" gets removed from the html element
Screenshots, screen recording, code snippet
Check out an inspection of the modal in Firefox looking at the 2024 Theme.
https://github.com/user-attachments/assets/908f23b5-52c9-4a0c-9e66-9f1b670494e1
Environment info
WordPress 6.6.1
Firefox 128.0.2, Chrome 119.0.6045.105
Mac OS 14.5
Gutenberg install - unknown
Please confirm that you have searched existing issues in the repo.
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Description
Recently we've noticed that the Interactivity API closes the mobile modal when clicking anywhere on the screen except inside the modal. This prevents several things when working on the front-ends of our sites.
We work primarily using Firefox for development, and the bug seems to be here and in the latest version of Chrome.
Issue:
You cannot inspect the modal or items in it. Since the Interactivity API removes the
has-modal-openclass on the html element.Step-by-step reproduction instructions
Screenshots, screen recording, code snippet
Check out an inspection of the modal in Firefox looking at the 2024 Theme.
https://github.com/user-attachments/assets/908f23b5-52c9-4a0c-9e66-9f1b670494e1
Environment info
WordPress 6.6.1
Firefox 128.0.2, Chrome 119.0.6045.105
Mac OS 14.5
Gutenberg install - unknown
Please confirm that you have searched existing issues in the repo.
Please confirm that you have tested with all plugins deactivated except Gutenberg.