Cannot simply force focus on text input in stand-alone Google App using HtmlService?

前端 未结 1 734
逝去的感伤
逝去的感伤 2020-12-21 11:51

I want to script a click on an input box.

Here is an example where the focus() should do just that, but it doesn\'t! Why?

Code.gs:

function d         


        
相关标签:
1条回答
  • 2020-12-21 11:57

    This is an intentional security decision in Caja. Certain functions that are prone (across the web) to serious malicious misuse, such as submit() and focus(), can only be executed while in the context of a user-initiated event (such as a button click).

    0 讨论(0)
提交回复
热议问题