Hello everyone,
I’ve been struggling with an issue on my website when viewed on Safari mobile, and I’m hoping someone here might have encountered the same problem or has a solution.
The problem occurs when users navigate between pages, especially when the page loads quickly. The Safari mobile menu (the top address bar) sometimes overlaps the content, making it look like the content has been scrolled up slightly. This results in some elements near the top of the page being hidden underneath the menu bar. The issue is inconsistent, which makes it even more frustrating to debug.
What I’ve Tried So Far:
-
Viewport Recalculation: I believe this issue is related to how Safari handles viewport changes when transitioning between pages. To address this, I’ve tried forcing a slight scroll adjustment when the page loads (scrolling down by 1 pixel), which sometimes helps but isn’t foolproof.
-
Delayed Navigation: I added a small delay before loading a new page to give Safari time to recalculate the viewport. However, this doesn’t always work, especially if the delay is too short or too long.
-
Pixel vs. Viewport Units: Initially, I thought the issue might be related to using
vw
andvh
units in my CSS. I tried switching everything to pixel values to eliminate any inconsistencies with viewport units, but the problem persists, suggesting that the issue is more related to how Safari handles viewport resizing or recalculating on mobile. -
Default Webflow Components: I tried using the default Webflow layout elements (e.g. its pre-design navigation bar and such) to make sure, once again, it has nothing to with my own layout.
What I Need:
Has anyone else run into this issue with Safari mobile? If so, what approaches have you found effective in ensuring that the content isn’t overlapped by the menu bar on new page loads? I’m open to tweaking the design, JavaScript, or anything else that might help fix this.
Thanks in advance for any advice or insights!