Prevent swiping between web pages in iPad Safari

后端 未结 6 1064
执念已碎
执念已碎 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:11

    Navigation on swipe gestures are possible if there is a navigation history. Swipe left is the "go back to the previous page in my navigation history".

    So, if your app does not need a navigation history, which may be totally valid for a single screen game for example, then you can prevent the swipe issue by removing the navigation history.

    For example, I have a single page application that uses only in-memory history, I don't synchronize with the browser (history / URL). So, the "swipes" have nowhere to go to and "fix" this problem.

    That said, this is a work-around with its limitations that may not be good enough for your situation. (URL sharing is a basic thing in Internet)

    It seems browsers vendors mission is to make web developers's life miserable with silly things like that.

提交回复
热议问题