2

In most browsers, a javascript prompt() gives focus to the text entry field so the user can begin typing immediately.

In node-webkit, a javascript prompt() gives focus to the prompt window, but not the text entry field. The user has to click inside the field before typing.

How can I set the focus to inside the text entry field when using a prompt in node-webkit?

4

1 回答 1

1

一种可扩展的方法是使用 javascript 模式窗口创建自己的提示。许多常见的 JS 框架都有创建模态窗口的简单方法,这将使您可以完全控制正在显示的文本和输入。

于 2014-10-20T22:09:47.883 回答