Skip to content

bug: Sheet Modal content should only begin scrolling once its at its maximum height #24626

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

Closed
4 of 6 tasks
matthewgoodman13 opened this issue Jan 21, 2022 · 2 comments
Closed
4 of 6 tasks
Labels

Comments

@matthewgoodman13
Copy link

Prerequisites

Ionic Framework Version

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

Current Behavior

Hi! I believe this issue is halfway between a bug and a feature for the new Sheet modals. It is also possible that I may be taking a wrong approach on this.

What I want:
When you look at the Google Maps Bottom Sheet, you can notice that its content only scrolls once the modal is fully expanded. I would like this behavior.

Currently with Ionic's Sheet modals, if you add content that exceeds its height then add overflow-y: scroll, when you scroll on the modal, both the height and content scrolls simultaneously causing a buggy looking experience. For example, if the modal is at its 50% breakpoint and you begin expanding it to its maximum 100%, the gesture causes both the modal and content to scroll which seems quite unnatural when you see it. The content should stick to the top of the modal until its at its maximum, then begin scrolling afterwards.

Expected Behavior

Content that exceeds the height of a Sheet modal should only begin scrolling once the sheet modal has been fully expanded.

Steps to Reproduce

  1. Create any Sheet Modal
  2. Add enough content to it that it should exceed the viewports' height
  3. Add overflow-y to modal
  4. Scroll. (Buggy-looking scrolling will appear)

Code Reproduction URL

No response

Ionic Info

No response

Additional Information

I was thinking of possible solutions, and once events are emitted on breakpoints, this issue might be easier to tackle. There could be a scrolling class applied to the content that only is enabled if the modal is at its maximum position. (Any update with that feature? Can't wait to get my hands on it!)

Thanks!

@ionitron-bot ionitron-bot bot added the triage label Jan 21, 2022
@averyjohnston
Copy link
Contributor

Thanks for the issue. I'm going to close this as a duplicate of #24583; while the suggested fixes are a little different, it seems to be the same underlying behavior driving the report. I'm actively investigating that and should have a reply up there soon 👀

@ionitron-bot
Copy link

ionitron-bot bot commented Feb 20, 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 Feb 20, 2022
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

2 participants