mirror of
https://github.com/overleaf/overleaf.git
synced 2025-02-17 00:42:35 +00: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'
|
this.$scope.ui.view = 'editor'
|
||||||
|
|
||||||
const done = isNewDoc => {
|
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) {
|
if (options.gotoLine != null) {
|
||||||
// allow Ace to display document before moving, delay until next tick
|
// allow Ace to display document before moving, delay until next tick
|
||||||
// added delay to make this happen later that gotoStoredPosition in
|
// added delay to make this happen later that gotoStoredPosition in
|
||||||
|
|
Loading…
Reference in a new issue