Skip to content

Commit fa18ca0

Browse files
committed
Merge pull request #356 from ajaxorg/issues/focus-editor-after-loading-file
Give editor focus after opening a file from the file tree
2 parents 76a03b5 + 092e232 commit fa18ca0

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

client/ext/editors/editors.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -344,6 +344,12 @@ module.exports = ext.register("ext/editors/editors", {
344344

345345
this.currentEditor = editor;
346346

347+
// okay don't know if you would want this, but this is the way the 'open file' dialog
348+
// handles it so let's do that
349+
setTimeout(function () {
350+
ceEditor.focus();
351+
}, 100);
352+
347353
settings.save();
348354
},
349355

0 commit comments

Comments
 (0)