commit 2d3a7aa151b5129a68b3477865c9231e5611604a
parent e354d0f9fd47a1c62b718b05cfebccd0e46cae58
Author: Hunter
Date:   Thu, 28 May 2026 17:07:58 -0400

fix ios rubber-band judder in mobile keyboard mode

Diffstat:
Mresources/js/main.js | 14++++++++++++++
1 file changed, 14 insertions(+), 0 deletions(-)

diff --git a/resources/js/main.js b/resources/js/main.js @@ -505,6 +505,20 @@ function initializeCodeMirror() { // Focus the editor editorView.focus(); + // block touchmove in mobile keyboard mode unless inside a scrollable element (ios rubber-band fix) + document.addEventListener('touchmove', (e) => { + if (!document.body.classList.contains('mobile-keyboard-open')) return; + let node = e.target; + while (node && node !== document.body) { + if (node.scrollHeight > node.clientHeight) { + const style = getComputedStyle(node); + if (style.overflowY === 'auto' || style.overflowY === 'scroll') return; + } + node = node.parentElement; + } + e.preventDefault(); + }, { passive: false }); + // Global keydown handler for Cmd+F toggle document.addEventListener('keydown', function(e) { if ((e.metaKey || e.ctrlKey) && e.key === 'f') {