From c3aed4a3b1606ab9dd9fdabb0caa8124ddbd3f5c Mon Sep 17 00:00:00 2001 From: Jb Audras Date: Wed, 11 Jan 2023 14:05:22 +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. git-svn-id: https://develop.svn.wordpress.org/trunk@55052 602fd350-edb4-49c9-b593-d223f7449a82 --- src/js/_enqueues/lib/dialog.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/js/_enqueues/lib/dialog.js b/src/js/_enqueues/lib/dialog.js index 327d8768b8..eb7af5e6e3 100644 --- a/src/js/_enqueues/lib/dialog.js +++ b/src/js/_enqueues/lib/dialog.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'); } });