home *** CD-ROM | disk | FTP | other *** search
/ HTML Examples / WP.iso / wordpress / wp-includes / js / wpdialog.js < prev    next >
Encoding:
Text File  |  2013-12-28  |  435 b   |  20 lines

  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);
  20.