mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-06-02 05:41:33 +02: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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user