- From: Liam DeBeasi <notifications@github.com>
- Date: Wed, 08 Jun 2022 15:19:20 -0700
- To: w3c/manifest <manifest@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <w3c/manifest/issues/1041@github.com>
## Problem On platforms such as iOS, web apps installed to the home screen have swipe gestures that allow users to navigate back and forth between pages. Some Single Page Apps (SPA) implement their own transitions or manage their own stack based navigation. As a result, the default swipe gesture gets in the way of these custom solutions. When using webviews like WKWebView directly, developers can disable this swipe gesture functionality, but it is not currently possible to do the same with web apps installed to the home screen. This is not limited to iOS as I believe newer versions of Android implement certain platform navigation gestures as well. Right now developers can use `window.history.replaceState()` to navigate without this built-in swipe gesture, but it tends to interfere with custom page transitions and navigation stacks. The attached video shows the current problem in an SPA installed to the home screen: https://user-images.githubusercontent.com/2721089/112997236-ede0de80-913a-11eb-885a-c0baac5029cb.mp4 In this example, the app has a JS-driven swipe to go back gesture that involves the "Back" button transforming into the "People" title. Notice that the custom swipe gesture causes the tab bar to stay fixed as well. The video shows how easy it is to accidentally trigger the platform's built-in swipe to go back gesture. You can tell that the platform's built-in swipe gesture is being triggered because the tab bar transitions, and the "Back" button does not transform into the "People" title. Additionally, the platform's swipe back gesture causes the JS-driven swipe gesture to be triggered as well, resulting in an awkward UX. ## Solution Add an option to the Web App Manifest that allows developers to disable/enable the built-in gestures provided by an OS. This would allow the application to handle any gestures associated with navigating back/forward. ## Alternatives I previously proposed this as a feature for `touch-action` in CSS (https://github.com/w3c/pointerevents/issues/358). However, since this is very specific to installed web apps I wanted to propose the feature here to see if it makes more sense for this feature to exist in the Web App Manifest. -- Reply to this email directly or view it on GitHub: https://github.com/w3c/manifest/issues/1041 You are receiving this because you are subscribed to this thread. Message ID: <w3c/manifest/issues/1041@github.com>
Received on Wednesday, 8 June 2022 22:19:32 UTC