【发布时间】:2012-06-26 05:32:19
【问题描述】:
我有一个带有移动和桌面版本事件的主干视图:
events: {
"touchstart .button": "action1",
"mousedown .button": "action1",
"touchend .button": "action2",
"mouseup .button": "action2",
}
我只希望在从我的移动设备触摸时触发其中一个事件。目前在我的一个移动设备中,action1 被触发了两次。
我曾尝试使用来自this solution 的自定义方法,但不知何故,在 Android 2.3 中,不会触发 touchstart 之后的 touchend 自定义方法,而是会触发纯“touchend”。
因此,我在想如果“touchend”被触发,Backbone.js 是否可以防止“mouseup”被触发。
【问题讨论】:
标签: mobile backbone.js