-
Notifications
You must be signed in to change notification settings - Fork 13.5k
bug: scrolling issues with bottom sheet modal #24583
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
Comments
Thanks for the issue. Could you replicate your use case in a starter app and post the link here? This sounds like it may just be a bug, so I want to make sure I'm following. |
Thanks for the issue! This issue has been labeled as Please reproduce this issue in an Ionic starter application and provide a way for us to access it (GitHub repo, StackBlitz, etc). Without a reliable code reproduction, it is unlikely we will be able to resolve the issue, leading to it being closed. If you have already provided a code snippet and are seeing this message, it is likely that the code snippet was not enough for our team to reproduce the issue. For a guide on how to create a good reproduction, see our Contributing Guide. |
I created a quick sample project here: https://ionic-angular-action-sheet-g1wwzx.stackblitz.io I saw a css property on Could you please verify how we can scroll this content? |
Thanks! I see what you mean now. After investigation, it looks like the behavior you want exists on Either way, our documentation around this should be improved, since there isn't any example HTML for |
I'd like to chime in here! Your fix definitely does help, that is wrapping the Modal's content inside a IonContent. This allows for cards to stick to the top of the modal until its fully opened and allows for proper scrolling. Did notice a couple things though. @davideas let me know if you can confirm the same experience. Note that my experience have been with using Ionic with ReactJS. No CSS properties applied. Code Snippet:
|
Yes thanks @amandaesmith3 ! now at least is scrollable, well this wasn't documented :-)
|
Getting this as well. I also do find it is important, especially if you want absolute positioned buttons at the bottom of a 75% modal. If the max breakpoint is at 75%, scrolling up creates extra "whitespace" and shouldn't be allowed. |
I found a fix for the height thing. You can set modal height to 75vh, then use a max breakpoint of 1. Modal will not expand above this threshold. Gesture to close as discussed still needs to be fixed along with the "delay" |
Thanks for the extra details, folks. I'm able to replicate all issues mentioned, and in core, meaning they likely happen in all frameworks. To summarize:
|
@amandaesmith3 Great article! Has this upgrade resolved all the found modal bugs? |
@matthewgoodman13 We're still working on these issues; you can see the full 6.1.0 changelog here: https://github.com/ionic-team/ionic-framework/releases/tag/v6.1.0 |
No news I guess? Maybe the steps above should be at least mentioned in the documentation because without them, the sheet modal is unusable. |
Has anyone found a fix for the second report issue ? This is definitly causing accessibility issue on ios as when fully extand the bar is near the phone status bar so you often open the notification center. I was thinking handling the problem myself by using custom gesture to move the modal when user reach top of the scroll but I don't really know how I can move the modal directly from Angular ? |
@amandaejohnston , @liamdebeasi , As per the comment on jan 24, Any help is appreciated. currently using ionic version 6.18.0 and angular 12 version. |
Hi everyone, I have an update on the status of this thread. There are several issues noted here, so I'll give updates per-issue:
Here is a dev build that should fix issues 1 and 2 if anyone is interested in testing: |
Issue number: Part of #24583 --------- <!-- Please do not submit updates to dependencies unless it fixes an issue. --> <!-- Please try to limit your pull request to one type (bugfix, feature, etc). Submit multiple pull requests if needed. --> ## What is the current behavior? <!-- Please describe the current behavior that you are modifying. --> When a sheet modal is fully opened swiping down on the IonContent when the content is scrolled to top does not move the sheet modal down. This does not align with the card modal where doing the same actions causes the card modal to move down. ## What is the new behavior? <!-- Please describe the behavior or changes that are being added by this PR. --> - Swiping down on the content now moves the sheet modal down as long as the content is scrolled to the top. ## Does this introduce a breaking change? - [ ] Yes - [x] No <!-- If this introduces a breaking change: 1. Describe the impact and migration path for existing applications below. 2. Update the BREAKING.md file with the breaking change. 3. Add "BREAKING CHANGE: [...]" to the commit description when merging. See https://github.com/ionic-team/ionic-framework/blob/main/.github/CONTRIBUTING.md#footer for more information. --> ## Other information <!-- Any other information that is important to this PR such as screenshots of how the component looks before and after the change. --> Dev build: `7.8.3-dev.11712114476.152fc43d` Reviewers: Please test this on physical iOS and Android devices. Please check the following: 1. When a modal is fully opened, ensure that users can still scroll down (i.e. swipe up on the content to scroll down). 2. When a modal is fully opened, ensure that users can swipe down on the modal to dismiss when the content is scrolled to the top. 3. Repeat step 2 but ensure that swiping down scrolls content to the top when content is NOT already scrolled to the top. **Card Behavior** | Demo | | - | | <video src="https://github.com/ionic-team/ionic-framework/assets/2721089/910755c8-808e-4e0b-85d2-9a56a3b127c4"></video> | **Sheet Behavior** | `main` | branch | | - | - | | <video src="https://github.com/ionic-team/ionic-framework/assets/2721089/eb0b740f-b644-4602-93f9-8c634458239b"></video> | <video src="https://github.com/ionic-team/ionic-framework/assets/2721089/3844983e-ebbc-43f3-b5c2-20aad738b201"></video> |
Issue number: Part of #24583 --------- <!-- Please do not submit updates to dependencies unless it fixes an issue. --> <!-- Please try to limit your pull request to one type (bugfix, feature, etc). Submit multiple pull requests if needed. --> ## What is the current behavior? <!-- Please describe the current behavior that you are modifying. --> There is a noticeable delay between when users finish swiping and when scrolling is re-enabled. This is because the animation takes ~500ms to complete when finishing the swipe. This does not align with how we [re-enable scrolling in the card modal](https://github.com/ionic-team/ionic-framework/blob/9b3cf9fbc2c5189871b2255d2d765e78509f5027/core/src/components/modal/gestures/swipe-to-close.ts#L262-L264). In the card modal, scrolling is re-enabled as soon as the gesture is released. ## What is the new behavior? <!-- Please describe the behavior or changes that are being added by this PR. --> - To fix this, I aligned the behavior of the sheet modal with that of the card modal. As a result, whether or not the content is scrollable is now tied to the state of the gesture rather than the state of the animation. ## Does this introduce a breaking change? - [ ] Yes - [x] No <!-- If this introduces a breaking change: 1. Describe the impact and migration path for existing applications below. 2. Update the BREAKING.md file with the breaking change. 3. Add "BREAKING CHANGE: [...]" to the commit description when merging. See https://github.com/ionic-team/ionic-framework/blob/main/.github/CONTRIBUTING.md#footer for more information. --> ## Other information <!-- Any other information that is important to this PR such as screenshots of how the component looks before and after the change. --> Dev build: `7.8.3-dev.11712114476.152fc43d` Reviewers: Please test this on a physical iOS and Android devices. Ensure that swiping the modal fully open does a) re-enable scrolling and b) re-enable scrolling without a 500ms delay. **Card Behavior** | Demo | | - | | <video src="https://github.com/ionic-team/ionic-framework/assets/2721089/175c5721-b694-45bf-9acf-044214d979c9"></video> | **Sheet Behavior** | `main` | branch | | - | - | | <video src="https://github.com/ionic-team/ionic-framework/assets/2721089/a6d5fffd-57a5-4d43-9856-dc28dced5417"></video> | <video src="https://github.com/ionic-team/ionic-framework/assets/2721089/797395e9-f455-4a0b-87a3-b2f72c50afab"></video> |
Issue number: resolves #24583 --------- <!-- Please do not submit updates to dependencies unless it fixes an issue. --> <!-- Please try to limit your pull request to one type (bugfix, feature, etc). Submit multiple pull requests if needed. --> ## What is the current behavior? <!-- Please describe the current behavior that you are modifying. --> See #24583 (comment) ## What is the new behavior? <!-- Please describe the behavior or changes that are being added by this PR. --> - See #29260 and #29259. This PR is a combination of previously reviewed fixes. ## Does this introduce a breaking change? - [ ] Yes - [x] No <!-- If this introduces a breaking change: 1. Describe the impact and migration path for existing applications below. 2. Update the BREAKING.md file with the breaking change. 3. Add "BREAKING CHANGE: [...]" to the commit description when merging. See https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer for more information. --> ## Other information <!-- Any other information that is important to this PR such as screenshots of how the component looks before and after the change. --> Dev build: `7.8.3-dev.11712695191.1d7ec370`
Thanks for the issue. This has been resolved via #29312, and a fix will be available in an upcoming release of Ionic Framework. Please see #24583 (comment) for updates on related work. |
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. |
Uh oh!
There was an error while loading. Please reload this page.
Prerequisites
Describe the Feature Request
Possibility to scroll content if this exceeds screen size only when bottom sheet is fully expanded and touched the max breakpoint.
Then, when finishing to scroll the content down and there's nothng to scroll anymore, the bottom sheet should be dragged again at lower breakpoint.
Describe the Use Case
Having longer content in bottom sheet, content that exceeds the screen height is not visible because container not scrollable.
It's even a real problem for smaller screens.
Describe Preferred Solution
No response
Describe Alternatives
No response
Related Code
No response
Additional Information
No response
The text was updated successfully, but these errors were encountered: