From 4dadfff6bcef042023c8246e0bdb0db93dac65a8 Mon Sep 17 00:00:00 2001 From: Dannon Baker Date: Mon, 18 Oct 2021 13:00:43 -0400 Subject: [PATCH] Bugfix -- markdown editor scrolling in chrome for dialog-based elements (which change focus) Need to set selectionEnd prior to focus() call to get this to work right. --- client/src/components/Markdown/MarkdownEditor.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/components/Markdown/MarkdownEditor.vue b/client/src/components/Markdown/MarkdownEditor.vue index c15749635df..ae15c406a66 100644 --- a/client/src/components/Markdown/MarkdownEditor.vue +++ b/client/src/components/Markdown/MarkdownEditor.vue @@ -92,8 +92,8 @@ export default { const textCursor = textArea.selectionEnd; this.content = this.markdownText; Vue.nextTick(() => { - textArea.focus(); textArea.selectionEnd = textCursor; + textArea.focus(); }); }, },