mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Merge pull request #10273 from overleaf/ae-docname-apply
Add a `$scope.$applyAsync` wrapper around the "open a new document" code GitOrigin-RevId: 7c63338379053d20bd86f10d9db6855cb5c23fc3
This commit is contained in:
parent
50b346b4ed
commit
bcad89fd28
1 changed files with 28 additions and 26 deletions
|
@ -260,6 +260,7 @@ export default EditorManager = (function () {
|
|||
return
|
||||
}
|
||||
|
||||
this.$scope.$applyAsync(() => {
|
||||
// We're now either opening a new document or reloading a broken one.
|
||||
this.$scope.editor.open_doc_id = doc.id
|
||||
this.$scope.editor.open_doc_name = doc.name
|
||||
|
@ -287,12 +288,13 @@ export default EditorManager = (function () {
|
|||
|
||||
this.$scope.$broadcast('doc:opened')
|
||||
|
||||
return this.$scope.$apply(() => {
|
||||
return this.$scope.$applyAsync(() => {
|
||||
this.$scope.editor.opening = false
|
||||
this.$scope.editor.sharejs_doc = sharejs_doc
|
||||
return done(true)
|
||||
})
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
_openNewDocument(doc, callback) {
|
||||
|
|
Loading…
Reference in a new issue