diff --git a/src/web/public/app.js b/src/web/public/app.js index 5d1b2715..b8fcead4 100644 --- a/src/web/public/app.js +++ b/src/web/public/app.js @@ -224,6 +224,14 @@ const MobileDetection = { resizeTimeout = setTimeout(() => this.updateBodyClass(), 100); }; window.addEventListener('resize', this._resizeHandler); + + // iOS: prevent pinch-to-zoom (Safari ignores user-scalable=no since iOS 10) + if (this.isIOS()) { + this._gestureStartHandler = (e) => e.preventDefault(); + this._gestureChangeHandler = (e) => e.preventDefault(); + document.addEventListener('gesturestart', this._gestureStartHandler); + document.addEventListener('gesturechange', this._gestureChangeHandler); + } }, /** Remove event listeners */ @@ -232,6 +240,12 @@ const MobileDetection = { window.removeEventListener('resize', this._resizeHandler); this._resizeHandler = null; } + if (this._gestureStartHandler) { + document.removeEventListener('gesturestart', this._gestureStartHandler); + document.removeEventListener('gesturechange', this._gestureChangeHandler); + this._gestureStartHandler = null; + this._gestureChangeHandler = null; + } } }; diff --git a/src/web/public/mobile.css b/src/web/public/mobile.css index 0fcbdfda..aa8b0925 100644 --- a/src/web/public/mobile.css +++ b/src/web/public/mobile.css @@ -20,6 +20,24 @@ html.mobile-init .file-browser-panel { display: none !important; } +/* ============================================================================ + iOS Zoom Prevention (all mobile/tablet sizes) + iOS Safari ignores user-scalable=no since iOS 10. + font-size >= 16px on inputs prevents auto-zoom on focus. + touch-action: manipulation prevents double-tap zoom. + ============================================================================ */ +@media (max-width: 768px) { + /* Prevent iOS auto-zoom on input focus (triggers at font-size < 16px) */ + input, textarea, select { + font-size: 16px !important; + } + + /* Prevent double-tap zoom globally */ + html { + touch-action: manipulation; + } +} + /* ============================================================================ Tablet Breakpoint (430px - 768px) ============================================================================ */ diff --git a/src/web/public/upload.html b/src/web/public/upload.html index e9e39dc6..dbd88fc8 100644 --- a/src/web/public/upload.html +++ b/src/web/public/upload.html @@ -1,7 +1,7 @@
- +