Disable zoom on mobile view (#2008)
Browse filesDisable mobile zoom
- Update viewport meta tag with maximum-scale=1 and user-scalable=no
- Add touch-action: pan-x pan-y to prevent pinch-to-zoom gestures
Co-authored-by: Claude <noreply@anthropic.com>
- src/app.html +1 -1
- src/styles/main.css +1 -0
src/app.html
CHANGED
|
@@ -2,7 +2,7 @@
|
|
| 2 |
<html lang="en" class="h-full">
|
| 3 |
<head>
|
| 4 |
<meta charset="utf-8" />
|
| 5 |
-
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
| 6 |
<meta name="theme-color" content="rgb(249, 250, 251)" />
|
| 7 |
<script>
|
| 8 |
(function () {
|
|
|
|
| 2 |
<html lang="en" class="h-full">
|
| 3 |
<head>
|
| 4 |
<meta charset="utf-8" />
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
|
| 6 |
<meta name="theme-color" content="rgb(249, 250, 251)" />
|
| 7 |
<script>
|
| 8 |
(function () {
|
src/styles/main.css
CHANGED
|
@@ -7,6 +7,7 @@
|
|
| 7 |
html,
|
| 8 |
body {
|
| 9 |
overscroll-behavior: none;
|
|
|
|
| 10 |
}
|
| 11 |
|
| 12 |
@layer components {
|
|
|
|
| 7 |
html,
|
| 8 |
body {
|
| 9 |
overscroll-behavior: none;
|
| 10 |
+
touch-action: pan-x pan-y;
|
| 11 |
}
|
| 12 |
|
| 13 |
@layer components {
|