equal
deleted
inserted
replaced
|
1 /** |
|
2 * @output wp-includes/js/wpdialog.js |
|
3 */ |
|
4 |
|
5 /* |
|
6 * Wrap the jQuery UI Dialog open function remove focus from tinyMCE. |
|
7 */ |
1 ( function($) { |
8 ( function($) { |
2 $.widget('wp.wpdialog', $.ui.dialog, { |
9 $.widget('wp.wpdialog', $.ui.dialog, { |
3 open: function() { |
10 open: function() { |
4 // Add beforeOpen event. |
11 // Add beforeOpen event. |
5 if ( this.isOpen() || false === this._trigger('beforeOpen') ) { |
12 if ( this.isOpen() || false === this._trigger('beforeOpen') ) { |
6 return; |
13 return; |
7 } |
14 } |
8 |
15 |
9 // Open the dialog. |
16 // Open the dialog. |
10 this._super(); |
17 this._super(); |
|
18 |
11 // WebKit leaves focus in the TinyMCE editor unless we shift focus. |
19 // WebKit leaves focus in the TinyMCE editor unless we shift focus. |
12 this.element.focus(); |
20 this.element.focus(); |
13 this._trigger('refresh'); |
21 this._trigger('refresh'); |
14 } |
22 } |
15 }); |
23 }); |