Prevent Mobile Safari from presenting toolbar when bottom of viewport is tapped

前端 未结 5 1926
予麋鹿
予麋鹿 2021-02-02 06:05

We have a simple mobile app running in Mobile Safari (MS) on iOS. When the user scrolls down the page n pixels, a \"top\" button slides up from the bottom. The top butt

5条回答
  •  执念已碎
    2021-02-02 06:54

    Mika and typeoneerror are correct, but there is a workaround.

    The best workaround solution I found (that doesn't require minimal-ui) is to force the bottom navigation of iOS Safari to always stay open/visible. That way, clicks to the bottom of the window never open the bottom navigation since it's always open.

    To do that, you just need to apply some CSS and browser targeting with JS. Detailed steps on how:

    • How might one force-show the mobile Safari bottom nav bar to show programmatically?
    • Buttons aligned to bottom of page conflict with mobile Safari's menu bar

提交回复
热议问题