mirror of
https://github.com/overleaf/overleaf.git
synced 2024-12-24 17:43:40 +00:00
Merge pull request #15799 from overleaf/td-ide-page-synctex-jump-to-code-line
In React IDE page, jump to line when opening a document if specified by the options GitOrigin-RevId: ddcacee33779112f4d5383ef0b5520e378dc6eb6
This commit is contained in:
parent
9e72d55ea6
commit
289942d1a5
1 changed files with 3 additions and 1 deletions
|
@ -392,7 +392,9 @@ export const EditorManagerProvider: FC = ({ children }) => {
|
|||
new CustomEvent('doc:after-opened', { detail: isNewDoc })
|
||||
)
|
||||
if (hasGotoLine(options)) {
|
||||
// In CM6, jump to the line again after a stored scroll position has been restored
|
||||
window.setTimeout(() => jumpToLine(options))
|
||||
|
||||
// Jump to the line again after a stored scroll position has been restored
|
||||
if (isNewDoc) {
|
||||
window.addEventListener(
|
||||
'editor:scroll-position-restored',
|
||||
|
|
Loading…
Reference in a new issue