diff --git a/web_src/js/features/comp/ComboMarkdownEditor.js b/web_src/js/features/comp/ComboMarkdownEditor.js index 9826f2f2bf24..d486c5830acc 100644 --- a/web_src/js/features/comp/ComboMarkdownEditor.js +++ b/web_src/js/features/comp/ComboMarkdownEditor.js @@ -135,6 +135,12 @@ class ComboMarkdownEditor { $panelPreviewer.attr('data-tab', `markdown-previewer-${elementIdCounter}`); elementIdCounter++; + $tabEditor[0].addEventListener('click', () => { + requestAnimationFrame(() => { + this.focus(); + }); + }); + $tabs.tab(); this.previewUrl = $tabPreviewer.attr('data-preview-url');