Changeset 22491
- Timestamp:
- 11/09/2012 05:44:00 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/js/customize-controls.js
r22484 r22491 95 95 statuses.hide(); 96 96 }; 97 97 98 98 var toggleFreeze = false; 99 99 100 100 // Support the .dropdown class to open/close complex elements 101 101 this.container.on( 'click focus', '.dropdown', function( event ) { 102 102 event.preventDefault(); 103 103 104 104 if (!toggleFreeze) 105 105 control.container.toggleClass('open'); 106 106 107 107 // Don't want to fire focus and click at same time 108 108 toggleFreeze = true; … … 222 222 // Bind tab switch events 223 223 this.library.children('ul').on( 'click keydown', 'li', function( event ) { 224 224 225 225 if ( event.type === 'keydown' && 13 !== event.which ) 226 226 return; 227 227 228 228 var id = $(this).data('customizeTab'), 229 229 tab = control.tabs[ id ]; … … 834 834 var accordionFrozen = false; 835 835 $('.customize-section-title').bind('click keydown', function( event ) { 836 836 837 837 if ( event.type === 'keydown' && 13 !== event.which ) // enter 838 838 return; 839 839 840 840 var clicked = $( this ).parents( '.customize-section' ); 841 841 842 842 if ( clicked.hasClass('cannot-expand') || accordionFrozen ) 843 843 return; 844 844 845 845 // Don't want to fire focus and click at same time 846 846 accordionFrozen = true; … … 848 848 accordionFrozen = false; 849 849 }, 400); 850 850 851 851 // Scroll up if on #customize-section-title_tagline 852 852 if ('customize-section-title_tagline' === clicked.attr('id')) … … 869 869 event.preventDefault(); 870 870 }); 871 871 872 872 $('.back').keydown( function( event ) { 873 873 if ( 9 === event.which ) // tab
Note: See TracChangeset
for help on using the changeset viewer.