[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

Search

title

Body

[close]

/wp-includes/js/ -> wpdialog.js (source)

   1  /**
   2   * @output wp-includes/js/wpdialog.js
   3   */
   4  
   5  /*
   6   * Wrap the jQuery UI Dialog open function remove focus from tinyMCE.
   7   */
   8  ( function($) {
   9      $.widget('wp.wpdialog', $.ui.dialog, {
  10          open: function() {
  11              // Add beforeOpen event.
  12              if ( this.isOpen() || false === this._trigger('beforeOpen') ) {
  13                  return;
  14              }
  15  
  16              // Open the dialog.
  17              this._super();
  18  
  19              // WebKit leaves focus in the TinyMCE editor unless we shift focus.
  20              this.element.trigger('focus');
  21              this._trigger('refresh');
  22          }
  23      });
  24  
  25      $.wp.wpdialog.prototype.options.closeOnEscape = false;
  26  
  27  })(jQuery);


Generated : Thu Mar 28 08:20:01 2024 Cross-referenced by PHPXref