From ad7b569c1a585ac94053ece5ef7a9692432c04ef Mon Sep 17 00:00:00 2001 From: Anton Timmermans Date: Thu, 3 May 2018 15:26:31 +0000 Subject: [PATCH] Docs: Improve JSDoc for `wp-includes.js/wpdialog.js`. Props igorsch, LisanneKluitmans, manuelaugustin. Fixes #43947. git-svn-id: https://develop.svn.wordpress.org/trunk@43144 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/js/wpdialog.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/wp-includes/js/wpdialog.js b/src/wp-includes/js/wpdialog.js index 9f5c19bae4..baf1f2f01a 100644 --- a/src/wp-includes/js/wpdialog.js +++ b/src/wp-includes/js/wpdialog.js @@ -1,3 +1,6 @@ +/* + * Wrap the jQuery UI Dialog open function remove focus from tinyMCE. + */ ( function($) { $.widget('wp.wpdialog', $.ui.dialog, { open: function() { @@ -8,6 +11,7 @@ // Open the dialog. this._super(); + // WebKit leaves focus in the TinyMCE editor unless we shift focus. this.element.focus(); this._trigger('refresh');