Closed
Description
Prerequisites
- I have read the Contributing Guidelines.
- I agree to follow the Code of Conduct.
- I have searched for existing issues that already report this problem, without success.
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:
- Click the button to open the sheet modal
- Click the search bar to call logic to move to the
0.75
breakpoint. - Notice the breakpoint does change / modal animates
- Click outside of the sheet modal to dismiss it
- Click the button again to present the sheet modal
- Notice the visual breakpoint is 0.25
- If you log the
getCurrentBreakpoint()
value of theion-modal
reference it will be0.75
- Click the search bar again
- 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