1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-13 17:56:25 +00:00

Merge pull request #1591 from Redsandro/scrollSyncFix

Fixed bad merge; closes #1586; related to #1521
This commit is contained in:
Junyoung Choi (Sai)
2018-03-05 11:16:42 +09:00
committed by GitHub

View File

@@ -32,6 +32,7 @@ export default class CodeEditor extends React.Component {
constructor (props) { constructor (props) {
super(props) super(props)
this.scrollHandler = _.debounce(this.handleScroll.bind(this), 100, {leading: false, trailing: true})
this.changeHandler = (e) => this.handleChange(e) this.changeHandler = (e) => this.handleChange(e)
this.blurHandler = (editor, e) => { this.blurHandler = (editor, e) => {
if (e == null) return null if (e == null) return null
@@ -81,7 +82,6 @@ export default class CodeEditor extends React.Component {
} }
} }
}) })
this.scrollHandler = _.debounce(this.handleScroll.bind(this), 100, {leading: false, trailing: true})
} }
componentDidMount () { componentDidMount () {