Dialog: Don't hard-code widget data key. Fixes #9097 - UI dialog inheritance.

This commit is contained in:
Scott González 2013-02-18 16:07:15 -05:00
parent a692bf9b70
commit 5e1b8dc71a

View File

@ -697,6 +697,7 @@ $.widget( "ui.dialog", {
return;
}
var widgetFullName = this.widgetFullName;
if ( !$.ui.dialog.overlayInstances ) {
// Prevent use of anchors and inputs.
// We use a delay in case the overlay is created from an
@ -711,7 +712,7 @@ $.widget( "ui.dialog", {
!$( event.target ).closest(".ui-datepicker").length ) {
event.preventDefault();
$(".ui-dialog:visible:last .ui-dialog-content")
.data("ui-dialog")._focusTabbable();
.data( widgetFullName )._focusTabbable();
}
});
}