This commit is contained in:
2022-06-06 13:02:20 +02:00
parent 3389d3ea6a
commit 62d2339760
3008 changed files with 1324485 additions and 58 deletions

View File

@@ -0,0 +1,27 @@
/**
* @output wp-includes/js/wpdialog.js
*/
/*
* Wrap the jQuery UI Dialog open function remove focus from tinyMCE.
*/
( function($) {
$.widget('wp.wpdialog', $.ui.dialog, {
open: function() {
// Add beforeOpen event.
if ( this.isOpen() || false === this._trigger('beforeOpen') ) {
return;
}
// Open the dialog.
this._super();
// WebKit leaves focus in the TinyMCE editor unless we shift focus.
this.element.focus();
this._trigger('refresh');
}
});
$.wp.wpdialog.prototype.options.closeOnEscape = false;
})(jQuery);