【问题标题】:datepicker calendar disappears when scrolling on mobile/tablet在手机/平板电脑上滚动时,日期选择器日历消失
【发布时间】:2016-06-16 08:31:53
【问题描述】:

日期选择器日历在手机/平板电脑上滚动时消失。

当我单击字段(在手机或平板电脑上)日期时,会出现日历,但是当我想要滚动(您必须触摸屏幕才能滚动)时,日历会消失。这很烦人,因为这是我让它工作的最后一件事。

您可以查看下面的日期字段: http://domburghome.com/domburg/index.php/hotel/jan-tooropstraat-2a/

请有人帮助我。 thnxx

【问题讨论】:

  • 我无法在我的设备上复制这种行为。

标签: jquery-mobile datepicker calendar


【解决方案1】:

这是旧的,但在我搜索解决方案时出现在最前面的结果中,所以这是我修复它的方法。如果您使用的是 Bootstrap 日期选择器,请检查 mousedown 事件处理程序并查看它是否也绑定到 touchstart。只需移除 touchstart。

$(document), {
                'mousedown touchstart': $.proxy(function(e){

把这个改成

$(document), {
                'mousedown': $.proxy(function(e){

提交在这里:https://github.com/uxsolutions/bootstrap-datepicker/pull/1284

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2014-08-18
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-02-02
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多