且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

防止JQuery Mobile在用户点击弹出窗口时关闭其弹出窗口

更新时间:2023-12-01 22:18:58

已作为功能请求添加到Github.参见问题此处.

This has been added as a feature request on Github. See issue here.

为此,在此过程中,可以取消ui-popup屏幕上的事件的绑定.我会将以下代码放在pageinit中.

As a hack for this in the interim is to unbind the events on the ui-popup-screen. I would put the following code in the pageinit.

$("#yourPopupId").on({
    popupbeforeposition: function () {
        $('.ui-popup-screen').off();
    }
});

这是一个繁琐的快速修复程序,但是可以使用.

This is a heavy handed quickfix, but it works.