Prevent swiping between web pages in iPad Safari

后端 未结 6 1078
执念已碎
执念已碎 2020-12-30 04:30

Swiping from the left and right edges of my iPad\'s Safari browser, moves between the currently open web pages. Is there any way to prevent it?

I have tried to add <

6条回答
  •  感动是毒
    2020-12-30 05:17

    There appears to be no way to disable this functionality, so as a workround I've found that a deadzone of 24px on either side of the page seems to be enough to stop unintentional navigation.

    Here is my CSS:

    body {
      position: fixed;
      top: 0;
      bottom: 0;
      left: 24px;
      right: 24px;
      background-color: #ccc;
    }
    

    Making the body position: fixed also stops Safari doing the annoying overscroll/bounce effect.

提交回复
热议问题