当输入字段通过java脚本调用获得焦点时,我想弹出触摸键盘。下面是我的示例代码,它适用于Chrome浏览器,但Firefox和Edge却没有。
<input id="foo" type="text"><br><br>
<button id="newActButton">New Act Button</button>
require(["dojo/on", "dojo/dom", "dijit/focus", "dojo/domReady!"],
function(on, dom, focusUtil) {
var newActButton = dom.byId("newActButton");
on(newActButton, "click", function(){
focusUtil.focus(dom.byId("foo"));
});
});