fix ios rubber-band judder in mobile keyboard mode
Hunter
Thursday, May 28th, 2026 at 5:07 PM
505 // Focus the editor
506 editorView.focus();
507
508 + // block touchmove in mobile keyboard mode unless inside a scrollable element (ios rubber-band fix)
509 + document.addEventListener('touchmove', (e) => {
510 + if (!document.body.classList.contains('mobile-keyboard-open')) return;
511 + let node = e.target;
512 + while (node && node !== document.body) {
513 + if (node.scrollHeight > node.clientHeight) {
514 + const style = getComputedStyle(node);
515 + if (style.overflowY === 'auto' || style.overflowY === 'scroll') return;
516 + }
517 + node = node.parentElement;
518 + }
519 + e.preventDefault();
520 + }, { passive: false });
521 +
522 // Global keydown handler for Cmd+F toggle
523 document.addEventListener('keydown', function(e) {
524 if ((e.metaKey || e.ctrlKey) && e.key === 'f') {