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

bug: ion-modal does not reset breakpoint value on dismiss #25245

Closed
4 of 7 tasks
sean-perkins opened this issue May 5, 2022 · 1 comment
Closed
4 of 7 tasks

bug: ion-modal does not reset breakpoint value on dismiss #25245

sean-perkins opened this issue May 5, 2022 · 1 comment
Labels
package: core @ionic/core package type: bug a confirmed bug report

Comments

@sean-perkins
Copy link
Contributor

sean-perkins commented May 5, 2022

Prerequisites

Ionic Framework Version

  • v4.x
  • v5.x
  • v6.x
  • Nightly

Current Behavior

When using inline an inline sheet modal, when the sheet modal is dismissed the breakpoint value remains as the value before it was dismissed.

This is problematic in situations where the sheet modal can be presented again, as the state of the modal will not be reflective of the visual state of the screen.

This will also distort the transition when you re-open the sheet modal and try to drag to a new breakpoint.

Expected Behavior

When the sheet modal is dismissed, the internal currentBreakpoint value should be set to the initialBreakpoint value. This way when the sheet is re-presented, the internal state will match the visual state.

Steps to Reproduce

Following the Stackblitz example:

  1. Click the button to open the sheet modal
  2. Click the search bar to call logic to move to the 0.75 breakpoint.
  3. Notice the breakpoint does change / modal animates
  4. Click outside of the sheet modal to dismiss it
  5. Click the button again to present the sheet modal
  6. Notice the visual breakpoint is 0.25
  7. If you log the getCurrentBreakpoint() value of the ion-modal reference it will be 0.75
  8. Click the search bar again
  9. Notice the sheet does not change position, as the check that compares the current breakpoint vs. the new breakpoint will return early

Code Reproduction URL

https://stackblitz.com/edit/mrg5um

Ionic Info

N/A

Additional Information

No response

@ionitron-bot
Copy link

ionitron-bot bot commented Jun 15, 2022

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Jun 15, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
package: core @ionic/core package type: bug a confirmed bug report
Projects
None yet
Development

No branches or pull requests

1 participant