Google Script - Sidebar button keeps opening a new tab

前端 未结 2 1336
野性不改
野性不改 2020-12-12 04:02

I\'m creating an extremely basic script to assist me in one of my google spreadsheets.

I\'ve successfully got a sidebar showing, with a few buttons (which function).

2条回答
  •  伪装坚强ぢ
    2020-12-12 04:08

    When I saw your issue, I thought that this is due to

    . So I proposed the following modifications.

    1. Modify to .

    2. Modify to .

    3. Remove .

    Note:

    • I think that @TheMaster's answer is more useful information.

    References:

    • Event.preventDefault()
    • The Document Base URL element

提交回复
热议问题