[ Index ]

PHP Cross Reference of WordPress

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.focus();
  21              this._trigger('refresh');
  22          }
  23      });
  24  
  25      $.wp.wpdialog.prototype.options.closeOnEscape = false;
  26  
  27  })(jQuery);


Generated: Sun Dec 22 01:00:02 2024 Cross-referenced by PHPXref 0.7.1