author | ymh <ymh.work@gmail.com> |
Tue, 09 Jun 2015 03:35:32 +0200 | |
changeset 5 | 5e2f62d02dcd |
child 9 | 177826044cd9 |
permissions | -rw-r--r-- |
5 | 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); |