CoreFiles by mySites.guru
wpdialog.js28 lines, 769 bytes, from wordpress-3.8-RC1.zip
Raw History Compare with 3.7-RC2
md5
a385e127675754d68ba3ee7f2e52000c
sha1
37d17d565e1874f20bedd5230860f474e55d2a32
sha256
9e652e973bab5ec08370e9a198736404c294cca8a81a1938bc5199514a5ceea5
(function($){
	$.ui.dialog.prototype.options.closeOnEscape = false;
	$.widget('wp.wpdialog', $.ui.dialog, {
		// Work around a bug in jQuery UI 1.9.1.
		// http://bugs.jqueryui.com/ticket/8805
		widgetEventPrefix: 'wpdialog',

		open: function() {
			var ed;

			// Initialize tinyMCEPopup if it exists and the editor is active.
			if ( tinyMCEPopup && typeof tinyMCE != 'undefined' && ( ed = tinyMCE.activeEditor ) && !ed.isHidden() ) {
				tinyMCEPopup.init();
			}

			// 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');
		}
	});
})(jQuery);

The same content is in 108 releases, WordPress 3.5-beta3 to 3.8.41. See them all, or every version of this file.