diff --git a/webapp/src/app.tsx b/webapp/src/app.tsx index d497ed60f263..87e3968cf62c 100644 --- a/webapp/src/app.tsx +++ b/webapp/src/app.tsx @@ -3651,7 +3651,7 @@ export class ProjectView if (this.state.collapseEditorTools) { this.expandSimulator(); } - if (!enabled) { + if (enabled) { document.addEventListener('keydown', this.closeOnEscape); simulator.driver.focus(); } else {