Is there a way of detecting (JS) when the user is swiping from the edge, in iOS9+ safari?
Asked Answered
I

0

8

In iOS Safari these days, the user can trigger a system BACK or FORWARD by swiping from the far left or right of the screen.

What I'm wondering is if there's a way to detect this condition (from JavaScript), while it's happening (as well as after the history navigation has occurred). That is, distinguish it from a swipe that is not causing system behaviors, and distinguish the end navigation from one triggered by a back button.

I see that there may have been a hacky way to detect whether the navigation on iOS7 was triggered by swipe or not (based on a bug about missing the touchend), but I'm not sure that method works anymore in iOS 9+. Also, it doesn't tell me during the swipe what is going on (I ideally need to suppress my touchmove handlers while the System is doing its thing...).

Immolate answered 16/9, 2016 at 0:19 Comment(2)
#2264572Tigrinya
Detecting a swipe isn't hard, what I'm after is distinguishing a normal touch move (where the page itself is stationary) from one where your whole page is moving to the right because the user swiped from the very edge and the iOS navigate-BACK-to-previous-page feature was triggered.Immolate

© 2022 - 2024 — McMap. All rights reserved.