fix: stop Cockpit work before asynchronous UI teardown

This commit is contained in:
Sameh Khamis committed 2026-09-13 02:46:57 -07:00
1 parent 947fc79182
commit 152d3e2352
11 files changed
+150 -15

No files matched your search

+1 -1
View File
@@ -247,7 +247,7 @@ export function exit({ restoreTracking = true } = {}) {
? this.entry
: this.entry || this.entryFocusOrigin;
this.entryFocusOrigin = null;
if (restoreTarget?.isConnected && !restoreTarget.hidden) {
if (!this.destroyed && restoreTarget?.isConnected && !restoreTarget.hidden) {
restoreTarget.focus({ preventScroll: true });
}
return true;