Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

294
Visualizações
How to remove focus from an Apps Script image button (Google Sheets)

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]

about 4 years ago · Juan Pablo Isaza
2 Respostas
Responde à pergunta

0

.activate will fit your needs.

var sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
sheet.getRange('A1').activate;

//Or this to go to the first empty cell in col A

var lastRow = sheet.getLastRow();
sheet.getRange(lastRow+1,1).activate;
about 4 years ago · Juan Pablo Isaza Relatório

0

The answer to this question is: There is currently no functionality to do this as of September 2021.

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda