update at 2026-03-04 13:25:26

This commit is contained in:
douboer@gmail.com
2026-03-04 13:25:26 +08:00
parent 7d2be3d67d
commit 5fbfdc651f
44 changed files with 84 additions and 1 deletions

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!