jQuery UI焦点问题

Shu*_*wal 6 jquery-ui

我正在接受问题

无法获取未定义或空引用的属性'_focusTabbable'

我正在使用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();**
                }
            });
        }
    });
}
Run Code Online (Sandbox Code Playgroud)

Geo*_*ier 7

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

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

$('#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');

        }
    }
});
Run Code Online (Sandbox Code Playgroud)