We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d162ffd commit 167c390Copy full SHA for 167c390
app/components/Editor/components/MarkdownEditor/mdMixin.js
@@ -62,16 +62,16 @@ export default {
62
}
63
64
},
65
- change: (cm, change) => {
+ change: debounce((cm, change) => {
66
const { editor } = this.props
67
if (!editor.previewDOM) return
68
const { top, clientHeight } = cm.getScrollInfo()
69
const lineCount = cm.lineCount()
70
const bottomLine = Math.round((top + clientHeight) / cm.defaultTextHeight()) + 1
71
if (bottomLine >= lineCount) {
72
- debounceScroll(editor.previewDOM.parentElement, editor.previewDOM.offsetHeight)
+ animatedScrollTo(editor.previewDOM.parentElement, editor.previewDOM.offsetHeight, 500)
73
74
- }
+ }, 500)
75
76
77
componentWillMount () {},
0 commit comments