mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-13 09:46:22 +00:00
Merge pull request #2819 from ZeroX-DG/feature/edit-from-preview
[Feature] Edit from preview
This commit is contained in:
@@ -835,6 +835,9 @@ export default class CodeEditor extends React.Component {
|
||||
ch: 1
|
||||
}
|
||||
this.editor.setCursor(cursor)
|
||||
const top = this.editor.charCoords({line: num, ch: 0}, 'local').top
|
||||
const middleHeight = this.editor.getScrollerElement().offsetHeight / 2
|
||||
this.editor.scrollTo(null, top - middleHeight - 5)
|
||||
}
|
||||
|
||||
focus () {
|
||||
|
||||
Reference in New Issue
Block a user