From 2ae40e6af5e1f7586f6d9c6d844b2806de04634b Mon Sep 17 00:00:00 2001 From: Daryl Koopersmith Date: Fri, 9 Nov 2012 05:44:00 +0000 Subject: [PATCH] Pinking shears. see #21283. git-svn-id: http://core.svn.wordpress.org/trunk@22491 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/js/customize-controls.js | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/wp-admin/js/customize-controls.js b/wp-admin/js/customize-controls.js index 60a88c8b6d..38e8e1addd 100644 --- a/wp-admin/js/customize-controls.js +++ b/wp-admin/js/customize-controls.js @@ -94,16 +94,16 @@ else statuses.hide(); }; - + var toggleFreeze = false; - + // Support the .dropdown class to open/close complex elements this.container.on( 'click focus', '.dropdown', function( event ) { event.preventDefault(); - + if (!toggleFreeze) control.container.toggleClass('open'); - + // Don't want to fire focus and click at same time toggleFreeze = true; setTimeout(function () { @@ -221,10 +221,10 @@ // Bind tab switch events this.library.children('ul').on( 'click keydown', 'li', function( event ) { - + if ( event.type === 'keydown' && 13 !== event.which ) return; - + var id = $(this).data('customizeTab'), tab = control.tabs[ id ]; @@ -833,21 +833,21 @@ // Temporary accordion code. var accordionFrozen = false; $('.customize-section-title').bind('click keydown', function( event ) { - + if ( event.type === 'keydown' && 13 !== event.which ) // enter return; - + var clicked = $( this ).parents( '.customize-section' ); if ( clicked.hasClass('cannot-expand') || accordionFrozen ) return; - + // Don't want to fire focus and click at same time accordionFrozen = true; setTimeout(function () { accordionFrozen = false; }, 400); - + // Scroll up if on #customize-section-title_tagline if ('customize-section-title_tagline' === clicked.attr('id')) $('.wp-full-overlay-sidebar-content').scrollTop(0); @@ -868,7 +868,7 @@ previewer.save(); event.preventDefault(); }); - + $('.back').keydown( function( event ) { if ( 9 === event.which ) // tab return;