1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-14 10:16:26 +00:00

- data-line attributes might not be directly under the body

- support checkbox preference `When scrolling, synchronize preview with editor`
This commit is contained in:
Baptiste Augrain
2018-12-24 11:25:41 +01:00
parent 9310e5e86c
commit e76bc72667
2 changed files with 11 additions and 7 deletions

View File

@@ -813,9 +813,7 @@ export default class MarkdownPreview extends React.Component {
}
scrollTo (targetRow) {
const blocks = this.getWindow().document.querySelectorAll(
'body>[data-line]'
)
const blocks = this.getWindow().document.querySelectorAll('body [data-line]')
for (let index = 0; index < blocks.length; index++) {
let block = blocks[index]