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: Bottom Gap appears randomly #121

Open
adshrc opened this issue Apr 20, 2023 · 6 comments
Open

Bug: Bottom Gap appears randomly #121

adshrc opened this issue Apr 20, 2023 · 6 comments

Comments

@adshrc
Copy link

adshrc commented Apr 20, 2023

Hi,

it seems like an essential thing broke since iOS 16.4 (seems like Android is not affected): The Modal Sheet does not start at the bottom. I could not find a way to re-produce it exactly, but it happens often (and randomly). I thought it was a problem in my app, but I just saw that it happens in the Apple Music demo (https://temzasse.github.io/react-modal-sheet/) too.

Maybe you have to open the Modal a couple times, but it will happen definitely. Here is a Screen Recording:

RPReplay_Final1681980041.mov

It's a pretty small gap here, but it can be quite big.

This happens on Chrome and Safari. Tested multiple devices, happens everywhere.

@viktorrenkema
Copy link

Also noticing this, seems to be exactly 30px.

@adshrc
Copy link
Author

adshrc commented May 11, 2023

I have found a way to reproduce it. You just need to scroll a couple pixels down from the very top of the page (and open a modal then). Seems like that it just happens when scrolling 1 to 30px. After 30px it works fine. @Temzasse why does it add a negative margin-top to the body when opening the modal? May be related to this bug...

@Temzasse
Copy link
Owner

Hi 👋🏻 Thanks for reporting this!

There is probably a bug in the sheet height calculation related to the dynamic browser viewport height. I'll try to find time and see if we can use the new dvh, lvh, svh units to fix this issue 🕵🏻

@Tomashiwa
Copy link

Hi @Temzasse, may I know if there is an update on this particular bug? Similar to adshrc, I can't replicate this reliably but it does happens now and then.

@Temzasse
Copy link
Owner

No updates unfortunately. A proper reproduction would help a lot to debug this issue. Without a repro it's just a guessing game 😅

@juvaly
Copy link

juvaly commented Dec 3, 2024

you can reproduce here (on mobile):
https://codesandbox.io/p/sandbox/wizardly-babbage-zw23km

simply swipe to scroll the page behind the sheet to make the top toolbar of the browser disappear (chrome in my case) - a gap appears below the sheet the same height of the toolbar that was just scrolled out of view.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants