From 3b02d701c4305dd4814ef25f0711d7e1498c0531 Mon Sep 17 00:00:00 2001 From: Nick Date: Sat, 31 Aug 2019 11:14:15 -0400 Subject: [PATCH] fix: editor mardkwon scroll sync --- client/components/editor/editor-markdown.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/components/editor/editor-markdown.vue b/client/components/editor/editor-markdown.vue index 4691956a..cbe0a697 100644 --- a/client/components/editor/editor-markdown.vue +++ b/client/components/editor/editor-markdown.vue @@ -163,7 +163,7 @@ codemirror(ref='cm', v-model='code', :options='cmOptions', @ready='onCmReady', @input='onCmInput') transition(name='editor-markdown-preview') .editor-markdown-preview(v-if='previewShown') - .editor-markdown-preview-content.contents + .editor-markdown-preview-content.contents(ref='editorPreviewContainer') div(ref='editorPreview', v-html='previewHTML') v-system-bar.editor-markdown-sysbar(dark, status, color='grey darken-3') @@ -503,7 +503,7 @@ export default { let destElm = this.$refs.editorPreview.querySelector(`[data-line='${closestLine}']`) if (destElm) { this.Velocity(this.$refs.editorPreview, 'stop', true) - this.Velocity(destElm, 'scroll', { offset: '-100', duration: 1000, container: this.$refs.editorPreview }) + this.Velocity(destElm, 'scroll', { offset: '-100', duration: 1000, container: this.$refs.editorPreviewContainer }) } } }, 500),