Entity saved modal dialog closes unexpectedly #67313
Labels
[Focus] Accessibility (a11y)
Changes that impact accessibility and need corresponding review (e.g. markup changes).
[Package] Editor
/packages/editor
[Status] In Progress
Tracking issues with work in progress
[Type] Bug
An existing feature does not function as intended
Description
When clicking the 'padding area' of the Entity saved modal dialog, the modal dialog closes unexpectedly.
Animated GIF to illustrate:
Turns out this modal dialog content, the
EntitiesSavedStatesExtensible
component, uses theuseDialog
hook to attach modal behaviors to the content. It is then used inside a Modal dialog. Basically, from a functional perspective, this is a Modal within a Modal.That explains why clicking outside the 'inner modal' (the content) closes the modal. In fact, clicking outside the area highlighted in the screenshot below but still inside the 'outer modal' closes the modal.
Step-by-step reproduction instructions
Screenshots, screen recording, code snippet
No response
Environment info
No response
Please confirm that you have searched existing issues in the repo.
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Please confirm which theme type you used for testing.
The text was updated successfully, but these errors were encountered: