app开发遇到问题及解决

1:ios and Android 差异input type=text

当用户点击input框时,弹出手机键盘,ios会遮挡输入框

解决办法:

pswOnFocus = function(){
    target = this;
    let u = navigator.userAgent;
    if(u.indexOf('Android') > -1 || u.indexOf('Adr') > -1){

    }else if(!!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/)){
       $timeout(function(){
           target.scrollIntoView(true);
       },300)
    }
}

 

2.弹出底层弹层时弹出手机键盘

解决办法:label for id的方法

 

posted @ 2016-12-22 15:30  Caraxiong  阅读(179)  评论(0编辑  收藏  举报