【发布时间】:2018-09-17 09:33:48
【问题描述】:
如果您在任何移动设备(如 iPad)上滚动时触摸选定的 (https://harvesthq.github.io/chosen/) 下拉容器,菜单将弹出,您将无法滚动页面。
我尝试修改代码,注释掉两行并移动 _this.container_mousedown(evt);像这样:
this.container.on('touchstart.chosen', (function(_this) {
return function(evt) {
//_this.container_mousedown(evt);
};
})(this));
this.container.on('touchend.chosen', (function(_this) {
return function(evt) {
_this.container_mousedown(evt);
//_this.container_mouseup(evt);
};
})(this));
它可以滚动,但第一次触摸事件/点击不起作用。下拉菜单只会闪烁。
【问题讨论】:
标签: jquery jquery-chosen