From 6680184c9e11cb911a1cd7ac6a9f8ed5a4be01e5 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: https://develop.svn.wordpress.org/trunk@22512 602fd350-edb4-49c9-b593-d223f7449a82 --- 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 () {