diff --git a/admin/range.html b/admin/range.html index 8316551..5dd67ac 100644 --- a/admin/range.html +++ b/admin/range.html @@ -2,7 +2,7 @@
- + diff --git a/admin/review.html b/admin/review.html index fa029fa..3c2f2f9 100644 --- a/admin/review.html +++ b/admin/review.html @@ -2,7 +2,7 @@ - + diff --git a/public/assets/fluid.js b/public/assets/fluid.js index 48fb574..62f15e9 100644 --- a/public/assets/fluid.js +++ b/public/assets/fluid.js @@ -524,6 +524,22 @@ } } + // ---------- 拡大させない ---------- + // iOS Safari は viewport の user-scalable=no を無視するので、ピンチは gesture* イベントと + // 2本指の touchmove を止めて防ぐ。ダブルタップの拡大は CSS の touch-action で止めている + // (JS で 2回目のタップを止めると、素早い連打のクリックまで消えてしまうため) + const stopZoom = (e) => e.preventDefault(); + for (const type of ['gesturestart', 'gesturechange', 'gestureend']) { + document.addEventListener(type, stopZoom, { passive: false }); + } + document.addEventListener( + 'touchmove', + (e) => { + if (e.touches.length > 1) e.preventDefault(); + }, + { passive: false }, + ); + window.Fluid = { Spring, VelocityTracker, diff --git a/public/assets/style.css b/public/assets/style.css index ee44117..e97fab7 100644 --- a/public/assets/style.css +++ b/public/assets/style.css @@ -173,6 +173,8 @@ html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--bg); + /* スクロールだけ許し、ピンチとダブルタップの拡大は止める(子の touch-action もこれに絞られる) */ + touch-action: pan-x pan-y; } body { @@ -1462,7 +1464,7 @@ body.page-table { display: flex; flex-direction: column; background: var(--room); - touch-action: manipulation; /* ダブルタップでの拡大を防ぐ(ピンチ拡大は残す) */ + touch-action: pan-x pan-y; /* ダブルタップ・ピンチでの拡大を防ぐ */ -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; diff --git a/public/create.html b/public/create.html index 1b39c97..8fd04a3 100644 --- a/public/create.html +++ b/public/create.html @@ -2,7 +2,7 @@ - + diff --git a/public/key.html b/public/key.html index 3f36539..a155190 100644 --- a/public/key.html +++ b/public/key.html @@ -2,7 +2,7 @@ - + diff --git a/public/lobby.html b/public/lobby.html index f6b700e..e022008 100644 --- a/public/lobby.html +++ b/public/lobby.html @@ -2,7 +2,7 @@ - + diff --git a/public/table.html b/public/table.html index 446d253..3adad62 100644 --- a/public/table.html +++ b/public/table.html @@ -2,7 +2,7 @@ - +