為什么 ui.alert 的注釋會導致 Modal Dialog 的提交無法在提交時關閉?這些函式實際上仍然在做它們應該做的事情,但對話框不會消失;你必須點擊關閉按鈕。我一直在使用警報框來解決我的作業,現在當我將它們注釋掉時,我發現有一個我不能,而不會產生這個問題。

If you need to reference them, OnEdit is in a Script with the same name. reactToUserEntryOfStart comes right after it.
makeTimeFromUserEntry is in a Script named functions called prior.
adjustAmPmAndAddDateBasedOnPreviousStart is at the bottom of Script main function and functions called, and the 7 subfunctions that it uses for each of 7 possible types of user entry / previous time combinations are above it. confirmIntent is at the very top.
Everything else is in the Script Dialog Box functions and the Index.html.
Thank you for your help; I'm bewildered.
YouTube video demonstrating bug
uj5u.com熱心網友回復:
當我看到您的示例電子表格和您當前的腳本時,在您的情況下,以下修改如何?
從:
google.script.run.getStartFromDialog(document.getElementById("startChoiceForm"));
到:
google.script.run.withSuccessHandler(google.script.host.close).getStartFromDialog(document.getElementById("startChoiceForm"));
- 當
ui.alert ('Chosen option is ' start);在功能使用getStartFromDialog,對話框被覆寫ui.alert。這樣,當單擊確定按鈕時,對話框將關閉。當您想通過單擊提交按鈕關閉對話框時,google.script.host.close使用withSuccessHandler.
參考:
- withSuccessHandler(函式)
轉載請註明出處,本文鏈接:https://www.uj5u.com/shujuku/339392.html
