Skip to content

Commit dc1bb67

Browse files
committed
Focus text when changing tests
1 parent 2a4e85d commit dc1bb67

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

dev/src/views/Text.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,6 @@ export default class Text extends EventDispatcher {
373373
this._tests.push(o);
374374
this.testList.addItem(o, true);
375375
this._handleTestChange();
376-
this.testEditor.focus();
377376
this.testEditor.execCommand("selectAll");
378377
this._change();
379378
}
@@ -405,6 +404,8 @@ export default class Text extends EventDispatcher {
405404
this._getTestEditor($.query("article .editor .pad", el), o);
406405
this._updateTestHeader(o, el, true);
407406
this._updateSelTest();
407+
this.testEditor.focus();
408+
this.testEditor.setCursor(this.testEditor.lineCount(), 0);
408409
}
409410

410411
_handleTestNameChange(fld, o) {

0 commit comments

Comments
 (0)