- From: cepm-nate <notifications@github.com>
- Date: Wed, 14 May 2025 08:19:13 -0700
- To: w3c/manifest <manifest@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Wednesday, 14 May 2025 15:19:17 UTC
cepm-nate left a comment (w3c/manifest#1041)
To anyone looking for a solution, here is what we implemented for a Framework7 Vue PWA app, within the main app mounted() function:
```
// Disable the 'swipe to back' gesture on iOS
const firstDiv = document.querySelector('div');
if (firstDiv) {
firstDiv.addEventListener('touchstart', (e) => {
let x = e.pageX;
// If pageX does not exist, try touches[0].pageX
if (!x) x = e.touches[0].pageX;
// is not near edge of view, exit
if (x > 20 && x < window.innerWidth - 20) return;
// prevent swipe to navigate back gesture
e.preventDefault();
});
}
```
--
Reply to this email directly or view it on GitHub:
https://github.com/w3c/manifest/issues/1041#issuecomment-2880637901
You are receiving this because you are subscribed to this thread.
Message ID: <w3c/manifest/issues/1041/2880637901@github.com>
Received on Wednesday, 14 May 2025 15:19:17 UTC