Skip to content

Conversation

@Mil4n0r
Copy link
Collaborator

@Mil4n0r Mil4n0r commented Apr 2, 2024

Checklist

  • Build process is done without errors. All tests pass in the /lib directory.
  • Self-reviewed the code before submitting.
  • Meets accessibility standards.
  • Added/updated documentation to /website as needed.
  • Added/updated tests as needed.

Description
There was a PR for this (#1817) but the solution was found to not be appropiate. In the end it seems that the simplest and most appropiate solution for this case scenario is to handle the Escape button interaction for our current and future components in a special way, adding event.stopPropagation() to prevent them from closing the Dialog in case they are inside one.

Closes #1515

@Jialecl Jialecl self-requested a review April 9, 2024 11:17
@Jialecl Jialecl self-assigned this Apr 9, 2024
Jialecl
Jialecl previously approved these changes Apr 9, 2024
@Jialecl Jialecl self-requested a review April 9, 2024 13:44
Copy link
Collaborator

@GomezIvann GomezIvann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two things:

  • The event propagation should only be stopped when the popovers are opened. If not, the propagation should work as usual (closing the dialog).
  • We need to update the Dialog test to check this funcionality.

@Mil4n0r Mil4n0r marked this pull request as draft April 10, 2024 11:31
@Mil4n0r Mil4n0r marked this pull request as ready for review April 10, 2024 11:36
@Mil4n0r Mil4n0r requested a review from GomezIvann April 10, 2024 11:36
@GomezIvann GomezIvann merged commit 9ef63cd into master Apr 11, 2024
@GomezIvann GomezIvann deleted the Mil4n0r/dialog_interaction_esc branch April 11, 2024 08:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Pop up components keyboard interactions inside a dialog

4 participants