test(){
// let aa = this.$refs.input1.blur();
// this.$nextTick((x)=>{ //正确写法
// // this.$refs.inputs.focus();
// // console.log(x)
// // this.$refs.inp[0].$refs.input.focus();
// },3000)
// $api.dom('input').focus();
// this.$refs.Inp.focus();
// aa.focus();
// $("input").trigger("click").focus();
$api.dom('input').addEventListener("touchstart", function(e){
console.log("aaaaaaa");
$("input").trigger("click").focus();
})
let theEvent = document.createEvent("Events");
theEvent.initEvent("touchstart", true, true);
$api.dom('input').dispatchEvent(theEvent);
console.log(88888)
console.log(this.focusVal)
},
如图,移动端H5界面打开后,如何自动调用软键盘,试了很多方法,发现只能聚焦,并不能调起软键盘。。。。
是不是h5没办法做到?
大佬们,帮忙看下
自己公司的应用中,还是其他应用中?
一般来说这种自动下载、自动播放、自动回流、自动聚焦都不是支持的,有可能老版本系统支持,新版本都不支持了。
如果是公司自己的应用,那么可以找客户端帮忙开一下配置。