Theme Installer: Left/right arrow keys in the overlay.
props adamsilverstein. see #27521. Built from https://develop.svn.wordpress.org/trunk@28036 git-svn-id: http://core.svn.wordpress.org/trunk@27866 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
93d2e831cb
commit
640d9cb1a1
|
@ -756,10 +756,19 @@ themes.view.Preview = themes.view.Details.extend({
|
|||
$( 'body' )
|
||||
.addClass( 'theme-installer-active full-overlay-active' )
|
||||
.on( 'keyup.overlay', function( event ) {
|
||||
// Pressing the escape key closes the preview
|
||||
// The escape key closes the preview
|
||||
if ( event.keyCode === 27 ) {
|
||||
self.close();
|
||||
}
|
||||
// The right arrow key, next theme
|
||||
if ( event.keyCode === 39 ) {
|
||||
self.nextTheme();
|
||||
}
|
||||
|
||||
// The left arrow key, previous theme
|
||||
if ( event.keyCode === 37 ) {
|
||||
self.previousTheme();
|
||||
}
|
||||
});
|
||||
$( '.close-full-overlay' ).focus();
|
||||
});
|
||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue