Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(modal): backdropBreakpoint allows interactivity behind sheet #24798

Merged
merged 3 commits into from
Feb 16, 2022

Conversation

liamdebeasi
Copy link
Contributor

@liamdebeasi liamdebeasi commented Feb 15, 2022

Pull request checklist

Please check if your PR fulfills the following requirements:

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been reviewed and added / updated if needed (for bug fixes / features)
  • Build (npm run build) was run locally and any changes were pushed
  • Lint (npm run lint) has passed locally and any fixes were made for failures

Pull request type

Please check the type of change your PR introduces:

  • Bugfix
  • Feature
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Documentation content changes
  • Other (please describe):

What is the current behavior?

Issue URL: resolves #24797

backdropBreakpoint partially only worked by chance, so the moment we changed something related to backdrop, this broke. We did not catch it because our test coverage for interacting with the backdrop is pretty minimal.

  1. We fixed a bug where the modal was not immediately capturing click events. This was to fix a change in behavior from Ionic 5 --> Ionic 6. In doing so, we made it so that developers can never click behind the modal which is a problem for the sheet modal.
  2. Even after fixing that issue, the entering animation always adds pointer-events: none to the backdrop so you cannot accidentally dismiss the modal while it is entering. Because we call progressStart on the sheet animation, pointer-events: none was always added to the backdrop so you could never interact with it.
  3. Finally, we needed to toggle pointer events on the host due to the changes in point 1.

What is the new behavior?

  • When a backdrop is inactive in a sheet modal, users can now interact with content behind the modal.
  • pointer-events: none on the entering animation is no longer applied with sheet modals where the backdrop is inactive.

Does this introduce a breaking change?

  • Yes
  • No

Other information

@liamdebeasi liamdebeasi requested a review from a team as a code owner February 15, 2022 23:38
@github-actions github-actions bot added the package: core @ionic/core package label Feb 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package: core @ionic/core package
Projects
None yet
3 participants