Code Modernization: Fix a JS error in `wpdialog`.
This changeset replaces `this.element._trigger('focus');` with `this.element.trigger('focus');` in `wpdialog` to fix a JS error introduced in [55052]. Indeed, `this` inside the `open()` function of `wpdialog` refers to the jQuery UI widget, whereas `this.element` is the jQuery object of the DOM element. Thus, native jQuery methods need to be used, as `_trigger` is only defined on the jQuery UI widget. Follow-up to [55052]. Props TobiasBg, audrasjb, shubham1gupta. Fixes #56830. Built from https://develop.svn.wordpress.org/trunk@55134 git-svn-id: http://core.svn.wordpress.org/trunk@54667 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
fe2c8f9237
commit
0cdd1f8069
|
@ -17,7 +17,7 @@
|
|||
this._super();
|
||||
|
||||
// WebKit leaves focus in the TinyMCE editor unless we shift focus.
|
||||
this.element._trigger('focus');
|
||||
this.element.trigger('focus');
|
||||
this._trigger('refresh');
|
||||
}
|
||||
});
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
/*! This file is auto-generated */
|
||||
!function(e){e.widget("wp.wpdialog",e.ui.dialog,{open:function(){this.isOpen()||!1===this._trigger("beforeOpen")||(this._super(),this.element._trigger("focus"),this._trigger("refresh"))}}),e.wp.wpdialog.prototype.options.closeOnEscape=!1}(jQuery);
|
||||
!function(e){e.widget("wp.wpdialog",e.ui.dialog,{open:function(){this.isOpen()||!1===this._trigger("beforeOpen")||(this._super(),this.element.trigger("focus"),this._trigger("refresh"))}}),e.wp.wpdialog.prototype.options.closeOnEscape=!1}(jQuery);
|
|
@ -16,7 +16,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '6.2-alpha-55133';
|
||||
$wp_version = '6.2-alpha-55134';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue