]> scripts.mit.edu Git - autoinstalls/wordpress.git/blob - wp-includes/js/wpdialog.js
WordPress 4.1.1-scripts
[autoinstalls/wordpress.git] / wp-includes / js / wpdialog.js
1 ( function($) {
2         $.widget('wp.wpdialog', $.ui.dialog, {
3                 open: function() {
4                         // Add beforeOpen event.
5                         if ( this.isOpen() || false === this._trigger('beforeOpen') ) {
6                                 return;
7                         }
8
9                         // Open the dialog.
10                         this._super();
11                         // WebKit leaves focus in the TinyMCE editor unless we shift focus.
12                         this.element.focus();
13                         this._trigger('refresh');
14                 }
15         });
16
17         $.wp.wpdialog.prototype.options.closeOnEscape = false;
18
19 })(jQuery);