Skip to content

Commit a346695

Browse files
devvaannshabose
authored andcommitted
fix: cancel any pending raf
1 parent 76c7465 commit a346695

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/LiveDevelopment/BrowserScripts/RemoteFunctions.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1483,6 +1483,11 @@ function RemoteFunctions(config = {}) {
14831483
function registerHandlers() {
14841484
hideHighlight(); // clear previous highlighting
14851485
disableHoverListeners(); // Always remove existing listeners first to avoid duplicates
1486+
// Cancel any pending resize RAF so stale callbacks don't fire after re-init
1487+
if (_pendingResizeRAF) {
1488+
cancelAnimationFrame(_pendingResizeRAF);
1489+
_pendingResizeRAF = null;
1490+
}
14861491
getAllToolHandlers().forEach(handler => {
14871492
if (handler.unregisterInteractionBlocker) {
14881493
handler.unregisterInteractionBlocker();

0 commit comments

Comments
 (0)