Prevent iOS double-tap zoom
This commit is contained in:
+11
@@ -25,6 +25,7 @@
|
|||||||
}
|
}
|
||||||
*{box-sizing:border-box}
|
*{box-sizing:border-box}
|
||||||
html,body{margin:0;padding:0}
|
html,body{margin:0;padding:0}
|
||||||
|
html{touch-action:manipulation}
|
||||||
body{
|
body{
|
||||||
background:var(--bg);
|
background:var(--bg);
|
||||||
color:var(--txt);
|
color:var(--txt);
|
||||||
@@ -38,6 +39,7 @@ body{
|
|||||||
linear-gradient(90deg, rgba(0,240,255,.028) 1px, transparent 1px);
|
linear-gradient(90deg, rgba(0,240,255,.028) 1px, transparent 1px);
|
||||||
background-size:32px 32px;
|
background-size:32px 32px;
|
||||||
}
|
}
|
||||||
|
button,input,select,.chip,.stepper,.quick-summary{touch-action:manipulation}
|
||||||
.wrap{max-width:760px;margin:0 auto;padding:0 14px}
|
.wrap{max-width:760px;margin:0 auto;padding:0 14px}
|
||||||
|
|
||||||
/* ---------- Kopf ---------- */
|
/* ---------- Kopf ---------- */
|
||||||
@@ -1195,6 +1197,15 @@ function copyText(){
|
|||||||
window.addEventListener("hashchange",()=>{ if(!hashLock){ readHash(); render(); }});
|
window.addEventListener("hashchange",()=>{ if(!hashLock){ readHash(); render(); }});
|
||||||
setInterval(()=>{ if(lastR) renderTimeline(lastR); }, 30000);
|
setInterval(()=>{ if(lastR) renderTimeline(lastR); }, 30000);
|
||||||
|
|
||||||
|
/* iOS Safari zoomt sonst bei schnellem Doppeltippen auf Buttons/Slider.
|
||||||
|
Pinch-Zoom bleibt unberührt; verhindert wird nur der Double-Tap-Default. */
|
||||||
|
let lastTouchEnd = 0;
|
||||||
|
document.addEventListener("touchend", e=>{
|
||||||
|
const now = Date.now();
|
||||||
|
if (now - lastTouchEnd <= 320) e.preventDefault();
|
||||||
|
lastTouchEnd = now;
|
||||||
|
}, {passive:false});
|
||||||
|
|
||||||
/* ---------- Start ---------- */
|
/* ---------- Start ---------- */
|
||||||
readHash();
|
readHash();
|
||||||
initUI();
|
initUI();
|
||||||
|
|||||||
Reference in New Issue
Block a user