You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

20 lines
435 B

  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. // Open the dialog.
  9. this._super();
  10. // WebKit leaves focus in the TinyMCE editor unless we shift focus.
  11. this.element.focus();
  12. this._trigger('refresh');
  13. }
  14. });
  15. $.wp.wpdialog.prototype.options.closeOnEscape = false;
  16. })(jQuery);