From e77ec92846d065a8c667efb6a895afacd20997fa Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Fri, 9 Nov 2012 20:57:09 +0000 Subject: [PATCH] Customizer: Passes focus to the upload tab to avoid focus changing when a drag event occurs from outside the browser. props lessbloat. fixes #21283. git-svn-id: http://core.svn.wordpress.org/trunk@22512 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/js/customize-controls.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/wp-admin/js/customize-controls.js b/wp-admin/js/customize-controls.js index 4e3dd8b645..9a1bde061c 100644 --- a/wp-admin/js/customize-controls.js +++ b/wp-admin/js/customize-controls.js @@ -104,6 +104,9 @@ if (!toggleFreeze) control.container.toggleClass('open'); + if ( control.container.hasClass('open') ) + control.container.parent().parent().find('li.library-selected').focus(); + // Don't want to fire focus and click at same time toggleFreeze = true; setTimeout(function () {