In my spreadsheet I have a trivial script, which is adding a new row and getting the cursor into the second cell of the new row:
function rowadd() {
var d_akt = SpreadsheetApp.getActive();
var a_akt = d_akt.getActiveSheet();
var w_akt = a_akt.getActiveRange().getRow();
a_akt.insertRowsBefore(w_akt, 1);
a_akt.setActiveRange(a_akt.getRange(w_akt, 2));
}
The script runs when a user presses a button in the sheet. Works almost fine, but after the script ends the cursor is in the right cell, but i cant write in that cell without a mouse click. Looks like the navigation is not in the sheet. Can't find any solution how to fix that issue.