Code Modernization: Fix a jQuery Migrate deprecation in `wpdialog`.

This changeset replaces a `focus()` shorthand in WP Core's customized jQuery UI widget `wpdialog` to avoid a jQuery Migrate deprecation notice in the browser's console.

Props TobiasBg, elifvish.
Fixes #56830.

Built from https://develop.svn.wordpress.org/trunk@55052


git-svn-id: http://core.svn.wordpress.org/trunk@54585 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
audrasjb 2023-01-11 14:07:11 +00:00
parent 6e88e39baa
commit bc8ed77b19
3 changed files with 3 additions and 3 deletions

View File

@ -17,7 +17,7 @@
this._super();
// WebKit leaves focus in the TinyMCE editor unless we shift focus.
this.element.focus();
this.element._trigger('focus');
this._trigger('refresh');
}
});

View File

@ -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.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);

View File

@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
$wp_version = '6.2-alpha-55051';
$wp_version = '6.2-alpha-55052';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.