fix(deploy): remove orphaned proxy directives from template cleanup

Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
浅念
2026-09-23 18:41:31 +08:00
parent 57394387cc
commit 5efb89a252
3 changed files with 16 additions and 19 deletions
+7 -6
View File
@@ -277,7 +277,6 @@ function onPointerUp(event: PointerEvent): void {
// 不会再来)hover 原因同样会永久残留,这里按坐标判定一并清除;窗内正常
// 释放不清(点击后悬停继续暂停是合理行为)。
const rect = viewportEl.value?.getBoundingClientRect();
console.log('[dbg-up]', event.type, event.clientX, event.clientY, 'rect', rect ? `${rect.left}-${rect.right}` : 'none', 'hoverBefore', pauseReasons.has('hover'));
if (
rect !== undefined &&
(event.clientX < rect.left ||
@@ -397,7 +396,6 @@ function onFocusOut(): void {
// window 级兜底(滚动卡死修复 2026-09-23):pointerup 落在窗外/别的元素、
// 或整个 iframe 失焦(弹框抢焦点)时也要清 pointer 原因,避免暂停态永久卡住。
function onWindowPointerEnd(event: PointerEvent): void {
console.log('[dbg-wpe]', event.type, 'pointerDownY =', pointerDownY);
if (pointerDownY !== null) onPointerUp(event);
}
function onWindowBlur(): void {
@@ -410,8 +408,11 @@ function onWindowBlur(): void {
onMounted(() => {
document.addEventListener('visibilitychange', onVisibilityChange);
window.addEventListener('pointerup', onWindowPointerEnd);
window.addEventListener('pointercancel', onWindowPointerEnd);
// 捕获阶段注册(滚动卡死修复 2026-09-23):pointercancel 的派发路径在拖出
// 窗外场景不可靠(target 漂移/分发中断,冒泡监听实测收不到);window 捕获
// 是最先必达的阶段,兜底清理不依赖事件到达路径。
window.addEventListener('pointerup', onWindowPointerEnd, true);
window.addEventListener('pointercancel', onWindowPointerEnd, true);
window.addEventListener('blur', onWindowBlur);
onVisibilityChange();
if (typeof IntersectionObserver !== 'undefined' && viewportEl.value !== null) {
@@ -430,8 +431,8 @@ onBeforeUnmount(() => {
if (pointerWatchdog !== null) clearTimeout(pointerWatchdog);
layerEl.value?.clear();
document.removeEventListener('visibilitychange', onVisibilityChange);
window.removeEventListener('pointerup', onWindowPointerEnd);
window.removeEventListener('pointercancel', onWindowPointerEnd);
window.removeEventListener('pointerup', onWindowPointerEnd, true);
window.removeEventListener('pointercancel', onWindowPointerEnd, true);
window.removeEventListener('blur', onWindowBlur);
visibilityObserver?.disconnect();
if (resumeTimer !== null) clearTimeout(resumeTimer);