Skip to content

Commit 0ee1d0e

Browse files
committed
fix(motion): 折叠接管先摘补间再 kill
1 parent c003d73 commit 0ee1d0e

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎app/src/shell/useColumnFlip.ts‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,11 @@ export function useColumnFlip(id: string, folded: boolean, opts?: { paused?: boo
9595
const before = stored.current;
9696
stored.current = m.Flip.getState(sel); // 下一次变更的起点(本次提交后的形态)
9797
if (before === null || !changed) return; // 首次挂载只存基线;非折叠态变化不播
98+
// 下一个输入接管(R8.2)。🔴 **两步顺序不可颠倒** —— `motion/controls.ts` 的文件头记着 T11 的实测:
99+
// 反序(先 `timeline.kill()`)会把子 tween 变成**孤立体**,此后 `killTweensOf` 再也够不着它,
100+
// 旧动画会继续写 DOM(「看起来已被接管」的假绿)。
101+
m.gsap.killTweensOf(sel);
98102
handle.current?.timeline.kill();
99-
m.gsap.killTweensOf(sel); // 下一个输入接管(R8.2:kill 不还原已写出的值)
100103
const duration = flipDurationSec(tier);
101104
if (duration === null || systemPrefersReducedMotion()) return; // eco / reduced ⇒ 跳终态
102105
handle.current = {

0 commit comments

Comments
 (0)