I have a sheet with one button (a shape) which is associated with an Apps Script function.
When I click the button it inserts a row and activates a cell in that row.
Then if I try typing, nothing happens. I manually need to click on the new cell to be able to enter new text...
How can I change the code to be able to immediately start typing just after the click of the button (without additional click on the cell)?
function above_same_level() { var ws = SpreadsheetApp.getActive(); var row = ws.getActiveRange().getRow(); ws.insertRowsBefore(row, 1); ws.getRange('A'+ row).activate();};

