Prevent safari toolbar showing on mobile on swipe down

As the title suggest, is there a way to prevent the safari toolbar to show when rotating the model from up to down.
It’s a real mess when you try to move the camera, and the screen keeps resizing, and it lags while resizing …

Please help :smiley:

I don’t have an iPhone handy to test this behavior myself, but it sounds like the address bar might be popping up because of a scroll gesture. A search for “javascript prevent scroll swipe iOS” turned up some results, including this one: javascript - Prevent vertical scroll on swipe -vanilla JS - Stack Overflow

I think there are a couple of things to try:

  1. Setting the overflow-y to hidden to tell the browser that there’s nothing to scroll through
  2. You can call event.preventDefault() on touchstart or touchend events and that may stop the scroll.

However, if the swipe-down gesture is built into the browser, you will probably not be able to prevent it. From the browser’s perspective, they would typically want the address bar to be accessible no matter what page the user is viewing.

A solution here could be to create your own input solution for controlling the camera which uses different gestures than what Safari uses. You might look into a gesture-recognition library such as ZingTouch.

Hello @theblackneko just checking in, was your question answered? :smiley: