emilkowalski / vaul

An unstyled drawer component for React.
https://vaul.emilkowal.ski
MIT License
6k stars 201 forks source link

orientation change messes snapPoints #284

Closed tomasmozeris closed 2 weeks ago

tomasmozeris commented 7 months ago

window.innerHeight is set after device orientation change animation, it messes up snap points proportion values like [0.3, 0.7, 1] my current fix is after orientation change wait 400ms and set new array reference of snapPoints

https://stackoverflow.com/questions/12452349/mobile-viewport-height-after-orientation-change

emilkowalski commented 2 weeks ago

Fixed in #398