Skip to content

Commit e03591c

Browse files
committed
fix: boxes not getting dismissed when element doesn't exist in the dom anymore
1 parent 0a02487 commit e03591c

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/LiveDevelopment/BrowserScripts/RemoteFunctions.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4506,7 +4506,13 @@ function RemoteFunctions(config = {}) {
45064506
});
45074507

45084508
this.rememberedNodes = {};
4509-
redrawEverything();
4509+
4510+
// this check makes sure that if the element is no more in the DOM then we remove it
4511+
if (previouslyClickedElement && !previouslyClickedElement.isConnected) {
4512+
dismissUIAndCleanupState();
4513+
} else {
4514+
redrawEverything();
4515+
}
45104516
};
45114517

45124518
function applyDOMEdits(edits) {

0 commit comments

Comments
 (0)