diff --git a/services/web/frontend/js/ide/LoadingManager.js b/services/web/frontend/js/ide/LoadingManager.js index fcd3836d95..f63c1eeddb 100644 --- a/services/web/frontend/js/ide/LoadingManager.js +++ b/services/web/frontend/js/ide/LoadingManager.js @@ -17,6 +17,7 @@ class LoadingManager { this.$scope.$apply(() => { this.$scope.state.load_progress = 100 this.$scope.state.loading = false + this.$scope.$emit('editor:loaded') }) }) // Note: this will only catch errors in from i18n setup. ConnectionManager diff --git a/services/web/frontend/js/ide/directives/layout.js b/services/web/frontend/js/ide/directives/layout.js index 4349eaee5d..802b6a88ac 100644 --- a/services/web/frontend/js/ide/directives/layout.js +++ b/services/web/frontend/js/ide/directives/layout.js @@ -236,6 +236,12 @@ ng-click=\"handleClick()\">\ .$applyAsync(() => (customTogglerEl.scope().isOpen = false)) } + // Ensure editor resizes after loading. This is to handle the case where + // the window has been resized while the editor is loading + scope.$on('editor:loaded', () => { + ide.$timeout(() => layout.resizeAll()) + }) + // Save state when exiting $(window).unload(() => { // Save only the state properties for the current layout, ignoring sublayouts inside it.