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

props adamsilverstein. fixes #22606

git-svn-id: http://core.svn.wordpress.org/trunk@23399 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Mark Jaquith 2013-02-08 18:51:19 +00:00
parent 6953fe2a25
commit c2f837a3b4
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;