Allow Backround Image's "select a file" link to be activated by pressing return on the keyboard.

props adamsilverstein. fixes #22606

git-svn-id: https://develop.svn.wordpress.org/trunk@23399 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Mark Jaquith 2013-02-08 18:51:19 +00:00
parent 9f02654b0d
commit 6b335f1b6a
1 changed files with 5 additions and 0 deletions

View File

@ -886,6 +886,11 @@
event.preventDefault();
});
$('.upload-dropzone a.upload').keydown( function( event ) {
if ( 13 === event.which ) // enter
this.click();
});
$('.collapse-sidebar').on( 'click keydown', function( event ) {
if ( event.type === 'keydown' && 13 !== event.which ) // enter
return;