question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

bug: card modal content swipe with ion-nav behaves not smooth

See original GitHub issue

Prerequisites

Ionic Framework Version

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

Current Behavior

When using a ion-nav within a card modal and swiping down on the content it looks and feels weird because it moves the modal and scrolls the list at the same time

Expected Behavior

To not scroll the list if the modal is swiped down

Steps to Reproduce

See repo:

  1. ionic capacitor build ios
  2. run on ios device
  3. open modal
  4. forward to list page
  5. swipe down on content

Code Reproduction URL

https://github.com/EinfachHans/ionic-card-modal-swipe-dismiss-issue

Ionic Info

Ionic:

Ionic CLI : 6.19.1 (/Users/hans/.nvm/versions/node/v16.14.2/lib/node_modules/@ionic/cli) Ionic Framework : @ionic/angular 6.1.5 @angular-devkit/build-angular : 13.2.6 @angular-devkit/schematics : 13.2.6 @angular/cli : 13.2.6 @ionic/angular-toolkit : 6.1.0

Capacitor:

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

Utility:

cordova-res (update available: 0.15.4) : 0.15.1 native-run : 1.6.0

System:

NodeJS : v16.14.2 (/Users/hans/.nvm/versions/node/v16.14.2/bin/node) npm : 8.6.0 OS : macOS Monterey

Additional Information

No response

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
liamdebeasicommented, May 18, 2022

Sadly, no. Once we disable scrolling, the browser will not dispatch new scroll events while the gesture is still active (even if we remove overflow: hidden).

1reaction
EinfachHanscommented, May 18, 2022

@liamdebeasi works for me 😊

Another questions: What currently works is scrolling and if reached the top the modal dismissing starts within the same gesture. Can the other way around work as well? So when moving the modal to the top and when the top is reached start scrolling the content within the same gesture?

Read more comments on GitHub >

github_iconTop Results From Across the Web

bug: sheet should allow for short but quick swipes to move to ...
This behavior is more aligned with how our card modal behaves. However, when we use the [0, 0.8, 1] breakpoints the situation changes...
Read more >
ion-modal: Ionic Mobile App Custom Modal API Component
The swipeToClose property can be used to control whether or not the card modal can be swiped to close. note. The card display...
Read more >
Prevent BODY from scrolling when a modal is opened
Simply hide the body overflow and it makes body not scrolling. When you hide the modal, revert it to automatic. Here is the...
Read more >
How to Navigate in Ionic Modals with ion-nav - Ionic Blog
After my session during Ioniconf, there was a question about routing inside Ionic modals that came up during the Q&A. Because the modal...
Read more >
How to Customise Ionic 6 Modal and Popover - YouTube
In Ionic 6 the styling of modals and popovers has changed, because they are now using Shadow DOM. Follow this quick win to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found