fixes #210
This commit is contained in:
@@ -396,7 +396,10 @@ export class StudioService implements ProjectEnv {
|
||||
const previousScreen = this.#activeCodeEditor.map(state => state.previousScreen).unwrapOrNull()
|
||||
this.#activeCodeEditor.clear()
|
||||
if (this.layout.screen.getValue() === "code") {
|
||||
this.layout.screen.setValue(previousScreen ?? "default")
|
||||
// Defer the screen switch to avoid cascading UI updates during synchronous
|
||||
// box deletion. Switching the screen triggers DevicePanel re-evaluation which
|
||||
// clears mounts before remaining pointerHub onRemoved events have finished.
|
||||
queueMicrotask(() => this.layout.screen.setValue(previousScreen ?? "default"))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user