wp/wp-includes/js/wpdialog.js
changeset 5 5e2f62d02dcd
child 9 177826044cd9
equal deleted inserted replaced
4:346c88efed21 5:5e2f62d02dcd
       
     1 ( function($) {
       
     2 	$.widget('wp.wpdialog', $.ui.dialog, {
       
     3 		open: function() {
       
     4 			// Add beforeOpen event.
       
     5 			if ( this.isOpen() || false === this._trigger('beforeOpen') ) {
       
     6 				return;
       
     7 			}
       
     8 
       
     9 			// Open the dialog.
       
    10 			this._super();
       
    11 			// WebKit leaves focus in the TinyMCE editor unless we shift focus.
       
    12 			this.element.focus();
       
    13 			this._trigger('refresh');
       
    14 		}
       
    15 	});
       
    16 
       
    17 	$.wp.wpdialog.prototype.options.closeOnEscape = false;
       
    18 
       
    19 })(jQuery);