From c27220ada33c8f8d8a1cd51be94ebccefe8007a4 Mon Sep 17 00:00:00 2001 From: byrongamatos Date: Mon, 13 Jul 2026 15:18:01 +0200 Subject: [PATCH] fix(career): tilt rAF race + freshly-slammed stamp becomes a card CodeRabbit on #944: a queued tilt frame closed over the departed card and re-applied vars after pointerleave; and the just-slammed stamp never regained pp-tilt until the next open. Co-Authored-By: Claude Fable 5 --- plugins/career/screen.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugins/career/screen.js b/plugins/career/screen.js index 238fe37..4cadbae 100644 --- a/plugins/career/screen.js +++ b/plugins/career/screen.js @@ -674,6 +674,7 @@ if (!stamp) return; stamp.classList.remove('pp-stamp-hidden'); stamp.classList.add('pp-slam'); + stamp.classList.add('pp-tilt'); // freshly slammed = trading card too if (book) book.classList.add('pp-shake'); sfx('stamp'); markBadgeSeen(inst, gkey); @@ -764,6 +765,9 @@ } function onTiltLeave() { + // Cancel any queued frame: it closes over the departed card and would + // re-apply tilt vars after the pointer has left. + if (_tiltRaf) { cancelAnimationFrame(_tiltRaf); _tiltRaf = 0; } if (_tiltEl) { resetTilt(_tiltEl); _tiltEl = null; } }