zoukankan      html  css  js  c++  java
  • 手机浏览器页面点击不跳转(Android手机部分浏览器) 浏览器双击放大网页 解决

    手机端web网页项目(angluar js 1.4.6)

    1,网页项目开发过程中,使用PC浏览器能正常访问,IOS设备浏览器也能正常访问,但是使用Android部分浏览器进行访问的时候,链接偶尔不跳转,点击完没有任何反应(本人使用angluar js route进行单页面应用跳转),此时地址栏的路径已经被更新为点击后的地址.

    解决方案:使用UC浏览器远程调试工具,在PC端chrome浏览器监控手机端web页面控制台,最后发现有时路由跳转导致代码报错:

    TypeError: Cannot read property 'runner' of undefined
        at angular-animate.js:2330
        at forEach (angular.js:336)
        at closeChildAnimations (angular-animate.js:2325)
        at queueAnimation (angular-animate.js:2148)
        at Object.$$AnimateQueueProvider.$get.push (angular-animate.js:2040)
        at Object.$AnimateProvider.$get.leave (angular.js:5200)
        at cleanupLastView (angular-route.js:913)
        at angular-route.js:942
        at publicLinkFn (angular.js:7387)
        at $get.boundTranscludeFn (angular.js:7533)`

    (1)此错误是因为引入angular-animate.js导致的错误,我虽然引用了这个文件,但是没有使用,所以直接删除即可。

    (2)如果项目中用到了angular-animate.js,那么只有升级angular.js版本了,其实这个错误是1.4.6版本的一个bug,在1.4.9版本修复了该问题,详情参考https://github.com/angular/angular.js/issues/11992

    2,双击网页放大问题:

    现在的手机或平板电脑等移动设备上的浏览器默认都有双击放大的设置,怎么让双击不放大?

    解决方案:

    可以在页面头部加上meta

    <meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />

    最后问题解决 

  • 相关阅读:
    Python 操作 MySQL 之 pysql 与 SQLAchemy
    Python 列表元素里面含有字典或者列表进行排序
    Windows PyCharm QtDesigner/pyuic5配置
    Python之科学运算Pandas模块
    Linux 主要目录速查表
    php读取文件大小
    上传视频云点播和查看视频
    wordppt转pdf
    微信登录
    微信公众号
  • 原文地址:https://www.cnblogs.com/holdon521/p/5632700.html
Copyright © 2011-2022 走看看