Hi everyone
I’m building a hero section using React Three Fiber (based on Three.js) and everything looks perfect on desktop but on mobile browser ( Safari ) especially on Iphone the canvas jumps up and down whenever the browser address bar hides or shows.
It seems related to how mobile browsers handle 100vh
, 100lvh
, and even 100svh
.
I’ve tried everything (fixed positioning, overflow tricks, etc.) and the scene still shifts slightly.
Could you help me with this ?
Github: GitHub - JakubPaszko2001/FraymTest
Component route: FraymTest/app/components/Test2.tsx at f81fc03c713acfe1a2f0db258e8c08533af736ef · JakubPaszko2001/FraymTest · GitHub
Vercel for preview: https://fraym-test.vercel.app/