jQuery   发布时间:2022-03-30  发布网站:大佬教程  code.js-code.com
大佬教程收集整理的这篇文章主要介绍了jquery-ui – jQuery UI焦点问题大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
我正在接受问题

我正在使用Jquery-ui-1.10.2.custom.js

在这里遇到问题

if ( !$.ui.dialog.overlayInstances ) {
    // Prevent use of anchors and inputs.
    // We use a delay in case the overlay is created from an
    // event that we're going to be cancelling. (#2804)
    this._delay(function() {
        // Handle .dialog().dialog("close") (#4065)
        if ( $.ui.dialog.overlayInstances ) {
            this.document.bind( "focusin.dialog",function( event ) {
                if ( !that._allowInteraction( event ) ) {
                    event.preventDefault();
                    **$(".ui-dialog:visible:last .ui-dialog-content")
                        .data( widgetFullName )._focusTabbable();**
                }
            });
        }
    });
}

解决方法

当您打开对话框然后在此对话框的操作按钮中调用打开第二个对话框的@L_674_4@时,会出现错误.当您尝试关闭第二个对话框时,会出现错误.

要防止这种情况发生,请立即关闭一个对话框,然后调用第二个对话框.

$('#dialog1').dialog({

    buttons: {
        'No': function () {
            $(this).dialog('close')
        },'Yes': function () {

            // This works
            $(this).dialog('close');

            // Open second dialog
            OpenSecondDialog()

            // This doesn't work.  A bug will arise when attempTing to close the second dialog
            $(this).dialog('close');

        }
    }
});

大佬总结

以上是大佬教程为你收集整理的jquery-ui – jQuery UI焦点问题全部内容,希望文章能够帮你解决jquery-ui – jQuery UI焦点问题所遇到的程序开发问题。

如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。