I have a couple of buttons automating workflow on a Google Sheet.
After the assigned script has run, the image/button keeps keyboard focus. It only loses focus by pressing the escape key.
I haven't been able to find a programatic way to remove focus so I can get busy on the keyboard right away. There is one 'workaround' on here that opens then closes a sidebar but this is anything but elegant AND requires unncessary user permissions.
Any ideas?
[edited to add: .activate() and .setActiveSelection(range) do NOT remove focus from the image]
The answer to this question is: There is currently no functionality to do this as of September 2021.