update at 2026-03-03 21:19:52

This commit is contained in:
douboer@gmail.com
2026-03-03 21:19:52 +08:00
parent 3dc4144007
commit e4987a2d77
139 changed files with 21522 additions and 43 deletions

13
pxterm/fix_touch_css.cjs Normal file
View File

@@ -0,0 +1,13 @@
const fs = require('fs');
let code = fs.readFileSync('src/styles/main.css', 'utf8');
// The reason touchmove stops is because touch events on iOS are sometimes silently swallowed if touch-action is not correct.
// Actually, earlier you saw the logs: only `pointermove` is logging!! The `touchmove` ONLY LOGS ONCE!
// Safari 13+ on iOS stops emitting touchmove if it emits pointermove, UNLESS we call e.preventDefault() on the touchmove, but since we didn't get touchmove... Wait.
// Safari emits touchstart -> pointerdown -> touchmove (if not scrolling) / pointermove.
// Actually, the iOS browser decides it's doing a native scroll, so it cancels the `touchmove`. But wait, there was NO `touchcancel`!
// What if iOS is using `pointermove` instead of `touchmove` entirely for the rest of the gesture?
// YES! Pointer events are replacing Touch events in Safari for some logic!
// Our `touchmove` handler was the only one syncing the scroll:
// \`onTouchKeyboardTouchMove = (event: TouchEvent) => { ... }\`
// We IGNORED pointermove!