From bc8ed77b193ccb3b1981cef6c21dbc56eb64e2b9 Mon Sep 17 00:00:00 2001 From: audrasjb Date: Wed, 11 Jan 2023 14:07:11 +0000 Subject: [PATCH] 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 --- wp-includes/js/wpdialog.js | 2 +- wp-includes/js/wpdialog.min.js | 2 +- wp-includes/version.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/wp-includes/js/wpdialog.js b/wp-includes/js/wpdialog.js index 327d8768b8..eb7af5e6e3 100644 --- a/wp-includes/js/wpdialog.js +++ b/wp-includes/js/wpdialog.js @@ -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'); } }); diff --git a/wp-includes/js/wpdialog.min.js b/wp-includes/js/wpdialog.min.js index 9b535841ef..fb4b514f09 100644 --- a/wp-includes/js/wpdialog.min.js +++ b/wp-includes/js/wpdialog.min.js @@ -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); \ No newline at end of file +!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); \ No newline at end of file diff --git a/wp-includes/version.php b/wp-includes/version.php index cef4bf499c..c1b67be861 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -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.