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 +presenting-element + initial-breakpoint + breakpoints causes scroll issue #29003

Closed
3 tasks done
ozgurg opened this issue Feb 8, 2024 · 3 comments
Closed
3 tasks done
Assignees
Labels

Comments

@ozgurg
Copy link

ozgurg commented Feb 8, 2024

Prerequisites

Ionic Framework Version

v7.x

Current Behavior

When swiping down from its handle, the ion-modal starts swiping from the bottom and doesn't respond to touch movements. This issue only occurs on mobile phone resolutions; when tested on desktop resolutions, everything works as expected. And if you open the modal on desktop resolution first and resize the browser to mobile resolution, everything works as expected as well.

mode = ios

Kapture.2024-02-08.at.20.42.54.mp4

mode = md

Kapture.2024-02-08.at.20.57.18.mp4

Expected Behavior

The ion-modal should swipe to close as normal.

Steps to Reproduce

  1. Copy and paste the Card Modal example of the ion-modal component from the documentation: https://ionicframework.com/docs/api/modal#card-modal.
  2. Set breakpoints to [0, 1] and initial-breakpoint to 1. (Values are not important for reproducing the issue according to my experience.)
  3. Run the app and ensure the browser window size matches that of a mobile phone.
  4. Open the ion-modal.
  5. Try swiping down from its handle.
  6. You will notice a strange scrolling issue. It appears to behave like a swipe but in reverse.

Code Reproduction URL

https://github.com/ozgurg/ionic-ion-modal-presenting-element-initial-breakpoint-breakpoints-issue

Ionic Info

Ionic:

Ionic CLI : 7.2.0 (/Users/ozgurg/.nvm/versions/node/v18.18.2/lib/node_modules/@ionic/cli)
Ionic Framework : @ionic/vue 7.7.1

Capacitor:

Capacitor CLI : 5.7.0
@capacitor/android : not installed
@capacitor/core : 5.7.0
@capacitor/ios : not installed

Utility:

cordova-res : not installed globally
native-run : 2.0.1

System:

NodeJS : v18.18.2 (/Users/ozgurg/.nvm/versions/node/v18.18.2/bin/node)
npm : 9.8.1
OS : macOS Unknown

Additional Information

My reproduction code appears to be identical to the official Ionic blank starter, with the only modification being the replacement of the content in src/views/HomePage.vue with the Card Modal example from the Ionic documentation, along with the addition of breakpoints and initial-breakpoint attributes to test the issue. No other changes have been made.

@EinfachHans
Copy link
Contributor

You are mixing Card and Sheet style modals here, which doesn't work.

  • Setting presentingElement will make a modal to a card style modal
  • Setting breakpoints and initialBreakpoint will make a modal to a sheet style modal

There is an open feature request to support presenting element for sheet style modals as well: #24068

@liamdebeasi
Copy link
Contributor

As noted in #29003 (comment), this is due to us not supporting presentingElement with the sheet modal. You can follow #24068 for updates on this behavior.

@liamdebeasi liamdebeasi closed this as not planned Won't fix, can't repro, duplicate, stale Feb 13, 2024
Copy link

ionitron-bot bot commented Mar 14, 2024

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 Mar 14, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants