mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Merge pull request #6592 from overleaf/jk-cm6-switch-focus
[web] CM6: focus editor when switching back to doc GitOrigin-RevId: 1ef63dbcbd3befc2a2a7c4b43dc3a357489e5a11
This commit is contained in:
parent
4b14a14819
commit
e92cc8a4b1
1 changed files with 3 additions and 1 deletions
|
@ -178,7 +178,9 @@ export default EditorManager = (function () {
|
|||
this.$scope.ui.view = 'editor'
|
||||
|
||||
const done = isNewDoc => {
|
||||
this.$scope.$broadcast('doc:after-opened', { isNewDoc })
|
||||
const eventName = 'doc:after-opened'
|
||||
this.$scope.$broadcast(eventName, { isNewDoc })
|
||||
window.dispatchEvent(new CustomEvent(eventName, { isNewDoc }))
|
||||
if (options.gotoLine != null) {
|
||||
// allow Ace to display document before moving, delay until next tick
|
||||
// added delay to make this happen later that gotoStoredPosition in
|
||||
|
|
Loading…
Reference in a new issue