Open bryc opened 9 years ago
use editor.focus to get focus on first line.
To focus previous edited line use below code session = editor.getSession(); //Get the number of lines count = session.getLength();
//Go to the last line editor.gotoLine(count, session.getLine(count-1).length);
When you choose a file from the left sidebar (or when the app first loads), it won't let you type anything unless you click the editor.
It would be nice if the editor was automatically focused when doing this. I noticed that each Ace Editor actually saves the text cursor's position, so it is advantageous to focus and continue typing.
Ace editor has a built-in
focus
method.