This commit is contained in:
2024-05-23 22:04:56 +03:00
parent c2fadebab0
commit 9364ad4c5b
3193 changed files with 1042219 additions and 654 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.trigger('focus');
this._trigger('refresh');
}
});
$.wp.wpdialog.prototype.options.closeOnEscape = false;
})(jQuery);