HEX
Server: Apache/2.4.10 (Debian)
System: Linux rex18 3.16.0-6-amd64 #1 SMP Debian 3.16.56-1+deb8u1 (2018-05-08) x86_64
User: web145544 (6498)
PHP: 8.0.27
Disabled: show_source, system, passthru, exec, shell_exec, popen, proc_open, pfsockopen, proc_nice
Upload Files
File: /var/www/web145544/html/wordpress/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);