Search and Top Navigation
#9097 closed bug (fixed)
Opened February 18, 2013 04:47PM UTC
Closed February 18, 2013 09:07PM UTC
Last modified April 23, 2013 12:45PM UTC
UI dialog inheritance
Reported by: | Boucman | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | 1.10.2 |
Component: | ui.dialog | Version: | 1.10.1 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
If you create a widget (for example : $.mynamespace.mydialog) that inherits from ui.dialog, there is a bug in the $. Ui.dialog._createOverlay method.
It throw a undefined error on .data("ui-dialog")._focusTabbable() because the data name should be "mynamespace-mydialog".
_createOverlay: function() { if ( !this.options.modal ) { return; } 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 ( !$( event.target ).closest(".ui-dialog").length && // TODO: Remove hack when datepicker implements // the .ui-front logic (#8989) !$( event.target ).closest(".ui-datepicker").length ) { event.preventDefault(); $(".ui-dialog:visible:last .ui-dialog-content") .data("ui-dialog")._focusTabbable(); } }); } }); } this.overlay = $("<div>") .addClass("ui-widget-overlay ui-front") .appendTo( this._appendTo() ); this._on( this.overlay, { mousedown: "_keepFocus" }); $.ui.dialog.overlayInstances++; },
Dialog: Don't hard-code widget data key. Fixes #9097 - UI dialog inheritance.
Changeset: 5e1b8dc71a72d5753a95c49c844857b91fbdbade