Prevent iOS double-tap zoom

This commit is contained in:
Hermes Agent
2026-07-25 15:57:17 +00:00
parent 47d7f91604
commit 1a8a445a78
+11
View File
@@ -25,6 +25,7 @@
}
*{box-sizing:border-box}
html,body{margin:0;padding:0}
html{touch-action:manipulation}
body{
background:var(--bg);
color:var(--txt);
@@ -38,6 +39,7 @@ body{
linear-gradient(90deg, rgba(0,240,255,.028) 1px, transparent 1px);
background-size:32px 32px;
}
button,input,select,.chip,.stepper,.quick-summary{touch-action:manipulation}
.wrap{max-width:760px;margin:0 auto;padding:0 14px}
/* ---------- Kopf ---------- */
@@ -1195,6 +1197,15 @@ function copyText(){
window.addEventListener("hashchange",()=>{ if(!hashLock){ readHash(); render(); }});
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 ---------- */
readHash();
initUI();