From e7aa598f8b491bf83d4bccb1fb2e1bf8ce4bd93c Mon Sep 17 00:00:00 2001 From: jean-emmanuel Date: Tue, 29 Nov 2022 08:05:01 +0100 Subject: [PATCH] editor: horizontal scrolling issues with maximized code editor --- CHANGELOG.md | 3 +++ src/client/ui/ui-code-editor.js | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 74924f39..b5b71491 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,9 @@ - launcher - print a qrcode when the server starts to help connecting mobile devices +- editor + - horizontal scrolling issues with maximized code editor + ## 1.20.0 - bug fixes diff --git a/src/client/ui/ui-code-editor.js b/src/client/ui/ui-code-editor.js index 7c192af1..c2cce2a4 100644 --- a/src/client/ui/ui-code-editor.js +++ b/src/client/ui/ui-code-editor.js @@ -202,8 +202,10 @@ class CodeEditor { this.editor.fullscreen = this.field.classList.toggle('fullscreen') this.editor.setOptions({maxLines: this.editor.fullscreen ? 0 : 30}) - window.dispatchEvent(new Event('resize')) this.field.style.setProperty('--prefix', this.editor.fullscreen ? '"' + this.widget.getProp('id') + '."' : '') + setTimeout(()=>{ + window.dispatchEvent(new Event('resize')) + }) if (this.editor.fullscreen) { this.parent.parentContainer.classList.add('editor-breakout')