fix(embed): scroll freeze root cause — drag-set 'manual' pause reason never cleared

setReason('manual', true) fired on >8px drag had no clear path anywhere (wheel/keyboard have 500ms timers; pointer path didn't) — one drag left the reason permanently, stopping auto-scroll until refresh. Now cleared on pointerup, watchdog, and window blur.

Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
浅念
2026-09-23 17:09:17 +08:00
parent b414b3666e
commit 74593d9953
@@ -236,6 +236,7 @@ function onPointerDown(event: PointerEvent): void {
pointerWatchdog = null;
pointerDownY = null;
setReason('pointer', false);
setReason('manual', false);
scheduleResume();
}, POINTER_WATCHDOG_MS);
}
@@ -259,6 +260,10 @@ function onPointerUp(): void {
clearTimeout(pointerWatchdog);
pointerWatchdog = null;
}
// 拖动置位的 'manual' 原因在此清除(滚动卡死根因修复 2026-09-23:拖动 >8px
// setReason('manual', true) 此前无任何清除路径——一次拖动后暂停原因永久残留,
// 滚动停死到刷新;滚轮/键盘路径各有 500ms 定时清除,拖动漏了)。
setReason('manual', false);
setReason('pointer', false);
scheduleResume();
}
@@ -367,6 +372,7 @@ function onWindowPointerEnd(): void {
function onWindowBlur(): void {
pointerDownY = null;
setReason('pointer', false);
setReason('manual', false);
}
onMounted(() => {