Uncaught TypeError: Cannot read property 'trigger' of undefined(zepto.js)
来源:互联网 发布:非遗联盟大数据平台 编辑:程序博客网 时间:2024/05/20 08:42
去掉pointermove pointerdown pointerstart
原因:
点击tap,touchstart和pointerstart都执行了,tap里面代码执行了两次,仔细看了下,首先点击后触发了两次,说明被绑定了两次事件,然后查看下zepto的touch.js代码,发现它绑定了三个事件touchend MSPointerUp pointerup,touchend是触摸相关的事件,MSPointerUp 是ie10的触摸事件,pointerup是指针事件,所以应该是以前chrome不支持pointerup事件,现在新版本支持了,然后报错了,把zepto里面pointerup相关的事件都删除了后测试没有问题。
具体看:https://github.com/madrobby/zepto/issues/1249
1 0
- Uncaught TypeError: Cannot read property 'trigger' of undefined(zepto.js)
- background.js Uncaught TypeError: Cannot read property 'xxx' of undefined
- 浏览器报Uncaught TypeError: Cannot read property 'trigger' of undefined解决方案
- 浏览器报Uncaught TypeError: Cannot read property 'trigger' of undefined解决方案
- 浏览器报Uncaught TypeError: Cannot read property 'trigger' of undefined解决方案
- Extjs4---Uncaught TypeError: Cannot read property ‘items’ of undefined
- 【StackFlow】Uncaught TypeError: Cannot read property 'pageCount' of undefined
- Ckeditor: Uncaught TypeError: Cannot read property 'keyCode' of undefined 解决方法
- Uncaught TypeError: Cannot read property 'msie' of undefined问题解决方案
- Uncaught TypeError: Cannot read property 'options' of undefined 错误
- Uncaught TypeError: Cannot read property 'length' of undefined
- 错误:Uncaught TypeError: Cannot read property 'WebSocket' of undefined
- Uncaught TypeError: Cannot read property 'value' of undefined
- Uncaught TypeError: Cannot read property 'plugin' of undefined
- react Uncaught TypeError: Cannot read property 'title' of undefined
- Uncaught TypeError: Cannot read property 'width' of undefined
- Uncaught TypeError: Cannot read property 'substring' of undefined
- Uncaught TypeError: Cannot read property 'PRINT_INIT' of undefined user:100
- 基于 Python 的数据结构与算法分析学习记录(6-7)—— 树的遍历
- [Leetcode] #334 Increasing Triplet Subsequence
- 【C语言常识】mdk:Inline assembler rules for compiler keywords __asm and asm
- apache kafka系列之在zookeeper中存储结构
- SQL 视图 局部变量 全局变量 条件语句 事务 触发器
- Uncaught TypeError: Cannot read property 'trigger' of undefined(zepto.js)
- Ubuntu里shell和命令执行结果不同(Bash和sh区别)
- asp.net中的cookie
- Java数组全排列
- nginx/mysql平滑启动
- 运用Unity的组件创建服务器和客户端,实现游戏网络化
- android中四种更新UI的方法
- 【WLAN从入门到精通-基础篇】第5期——华为WLAN产品命名规范(了解即可)
- MAVEN项目报错:An internal error occurred during: "Updating Maven Project" java.lang.NullPoint