WordPress/wp-includes/js/wpdialog.js
Dion Hulse 7f29687a55 Revert [33845]
git-svn-id: http://core.svn.wordpress.org/branches/4.3@33847 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-03 03:33:24 +00:00

20 lines
435 B
JavaScript

( 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);