Customizer: Let return/enter fire click events for dropdowns and links. Remove errant focus event. Re-add box shadow and border for the overlay header. props lessbloat. see #21283.
git-svn-id: http://core.svn.wordpress.org/trunk@22731 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
769e1236af
commit
e9f355e623
|
@ -5533,6 +5533,12 @@ body.full-overlay-active {
|
|||
margin: 0;
|
||||
}
|
||||
|
||||
.wp-full-overlay-sidebar .wp-full-overlay-header {
|
||||
border-top: 0;
|
||||
border-bottom: 1px solid #fff;
|
||||
box-shadow: inset 0 -1px 0 0px #dfdfdf;
|
||||
}
|
||||
|
||||
.wp-full-overlay-sidebar .wp-full-overlay-footer {
|
||||
bottom: 0;
|
||||
border-bottom: 0;
|
||||
|
|
|
@ -98,7 +98,10 @@
|
|||
var toggleFreeze = false;
|
||||
|
||||
// Support the .dropdown class to open/close complex elements
|
||||
this.container.on( 'click focus', '.dropdown', function( event ) {
|
||||
this.container.on( 'click keydown', '.dropdown', function( event ) {
|
||||
if ( event.type === 'keydown' && 13 !== event.which ) // enter
|
||||
return;
|
||||
|
||||
event.preventDefault();
|
||||
|
||||
if (!toggleFreeze)
|
||||
|
@ -168,7 +171,10 @@
|
|||
this.uploader = new wp.Uploader( this.uploader );
|
||||
|
||||
this.remover = this.container.find('.remove');
|
||||
this.remover.click( function( event ) {
|
||||
this.remover.on( 'click keydown', function( event ) {
|
||||
if ( event.type === 'keydown' && 13 !== event.which ) // enter
|
||||
return;
|
||||
|
||||
control.setting.set( control.params.removed );
|
||||
event.preventDefault();
|
||||
});
|
||||
|
@ -232,8 +238,7 @@
|
|||
|
||||
// Bind tab switch events
|
||||
this.library.children('ul').on( 'click keydown', 'li', function( event ) {
|
||||
|
||||
if ( event.type === 'keydown' && 13 !== event.which )
|
||||
if ( event.type === 'keydown' && 13 !== event.which ) // enter
|
||||
return;
|
||||
|
||||
var id = $(this).data('customizeTab'),
|
||||
|
@ -251,7 +256,7 @@
|
|||
|
||||
// Bind events to switch image urls.
|
||||
this.library.on( 'click keydown', 'a', function( event ) {
|
||||
if ( event.type === 'keydown' && 13 !== event.which ) // enter
|
||||
if ( event.type === 'keydown' && 13 !== event.which ) // enter
|
||||
return;
|
||||
|
||||
var value = $(this).data('customizeImageValue');
|
||||
|
@ -882,7 +887,10 @@
|
|||
event.preventDefault();
|
||||
});
|
||||
|
||||
$('.collapse-sidebar').click( function( event ) {
|
||||
$('.collapse-sidebar').on( 'click keydown', function( event ) {
|
||||
if ( event.type === 'keydown' && 13 !== event.which ) // enter
|
||||
return;
|
||||
|
||||
overlay.toggleClass( 'collapsed' ).toggleClass( 'expanded' );
|
||||
event.preventDefault();
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue