summaryrefslogtreecommitdiffstatshomepage
path: root/src/js/_enqueues/lib/dialog.js
diff options
context:
space:
mode:
authorJb Audras <audrasjb@git.wordpress.org>2023-01-11 14:05:22 +0000
committerJb Audras <audrasjb@git.wordpress.org>2023-01-11 14:05:22 +0000
commitc3aed4a3b1606ab9dd9fdabb0caa8124ddbd3f5c (patch)
tree6d0e5e463419512f7adb45643e66ceade94691de /src/js/_enqueues/lib/dialog.js
parenta930d258b932b2e7d6e50f7fccc1d3d0607a5f0f (diff)
downloadwordpress-c3aed4a3b1606ab9dd9fdabb0caa8124ddbd3f5c.tar.gz
wordpress-c3aed4a3b1606ab9dd9fdabb0caa8124ddbd3f5c.zip
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
Diffstat (limited to 'src/js/_enqueues/lib/dialog.js')
-rw-r--r--src/js/_enqueues/lib/dialog.js2
1 files changed, 1 insertions, 1 deletions
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');
}
});