sufangyu / dialog2

移动端弹窗插件第二版,包括常见的 alert、confirm。toast、notice 四种类型弹窗,支持 jQuery 和 Zepto 库。(已停止维护,请使用vue、react 等新框架)
328 stars 96 forks source link

content中input无法输入 #11

Open jsoncode opened 6 years ago

jsoncode commented 6 years ago
$(document).dialog({
    type: 'alert',
    overlayClose: true,
    content: '<div><input type="text"></div>'
});
shanghen commented 6 years ago

我也发现的这个问题,去看了下源码发现作者在touch事件和mouse时间都返回了false,导致content-scroll类下的点击事件全部无效。如果还坚持使用该插件可以 $(document).off('touchstart mousedown touchmove mousemove touchend mouseup', '.content-scroll'); 解除了事件绑定即可

cyh1998 commented 5 years ago

$(document).off('touchstart mousedown touchmove mousemove touchend mouseup', '.content-scroll'); 这个方法无效啊? 还有什么解决办法吗

cyh1998 commented 5 years ago

可以了,谢谢