Skip to content

Commit

Permalink
fix ipad panning pwa
Browse files Browse the repository at this point in the history
  • Loading branch information
blurymind committed Dec 11, 2024
1 parent abba69d commit 5c68508
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
4 changes: 4 additions & 0 deletions src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -677,6 +677,10 @@ <h3>Settings</h3>
},
true
);
// fix for ipad pinch zoom/dragging breaking the ui
document.addEventListener('touchmove', function (event) {
event.preventDefault();
}, { passive: false });
</script>
</body>

Expand Down
11 changes: 10 additions & 1 deletion src/scss/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,20 @@
}
/* --- ROOT CSS --- */
body {
overflow: hidden;
-webkit-user-select: none;
line-height: 1.6em;
}

html, body {
overflow:hidden;
/* fix for ipad touch interactions breaking pannning */
overscroll-behavior: none;
overscroll-behavior-y: contain;
overscroll-behavior-x: contain;
-webkit-text-size-adjust: none;
touch-action: pan-y;
}

h1,
h2,
h3,
Expand Down

0 comments on commit 5c68508

Please sign in to comment.