react-modal-sheet icon indicating copy to clipboard operation
react-modal-sheet copied to clipboard

Bug: Bottom Gap appears randomly

Open adshrc opened this issue 3 years ago • 7 comments

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:

https://user-images.githubusercontent.com/16599151/233318387-77f66c51-5ab8-4c4f-9c2d-8cf48e704b1c.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.

adshrc avatar Apr 20 '23 09:04 adshrc

Also noticing this, seems to be exactly 30px.

viktorrenkema avatar May 01 '23 16:05 viktorrenkema

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...

adshrc avatar May 11 '23 11:05 adshrc

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 🕵🏻

Temzasse avatar May 17 '23 08:05 Temzasse

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.

Tomashiwa avatar Oct 23 '23 10:10 Tomashiwa

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

Temzasse avatar Oct 23 '23 13:10 Temzasse