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:
@@ -236,6 +236,7 @@ function onPointerDown(event: PointerEvent): void {
|
|||||||
pointerWatchdog = null;
|
pointerWatchdog = null;
|
||||||
pointerDownY = null;
|
pointerDownY = null;
|
||||||
setReason('pointer', false);
|
setReason('pointer', false);
|
||||||
|
setReason('manual', false);
|
||||||
scheduleResume();
|
scheduleResume();
|
||||||
}, POINTER_WATCHDOG_MS);
|
}, POINTER_WATCHDOG_MS);
|
||||||
}
|
}
|
||||||
@@ -259,6 +260,10 @@ function onPointerUp(): void {
|
|||||||
clearTimeout(pointerWatchdog);
|
clearTimeout(pointerWatchdog);
|
||||||
pointerWatchdog = null;
|
pointerWatchdog = null;
|
||||||
}
|
}
|
||||||
|
// 拖动置位的 'manual' 原因在此清除(滚动卡死根因修复 2026-09-23:拖动 >8px
|
||||||
|
// setReason('manual', true) 此前无任何清除路径——一次拖动后暂停原因永久残留,
|
||||||
|
// 滚动停死到刷新;滚轮/键盘路径各有 500ms 定时清除,拖动漏了)。
|
||||||
|
setReason('manual', false);
|
||||||
setReason('pointer', false);
|
setReason('pointer', false);
|
||||||
scheduleResume();
|
scheduleResume();
|
||||||
}
|
}
|
||||||
@@ -367,6 +372,7 @@ function onWindowPointerEnd(): void {
|
|||||||
function onWindowBlur(): void {
|
function onWindowBlur(): void {
|
||||||
pointerDownY = null;
|
pointerDownY = null;
|
||||||
setReason('pointer', false);
|
setReason('pointer', false);
|
||||||
|
setReason('manual', false);
|
||||||
}
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
|
|||||||
Reference in New Issue
Block a user