HEX
Server: nginx/1.24.0
System: Linux vm-6dd2b387-6a.novalocal 5.14.0-522.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Sun Oct 20 13:04:34 UTC 2024 x86_64
User: kusanagi (1000)
PHP: 7.4.33
Disabled: NONE
Upload Files
File: /home/kusanagi/geriatrics.jp/DocumentRoot/wp-includes/js/wpdialog.js
/**
 * @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);