diff options
Diffstat (limited to 'web')
-rw-r--r-- | web/cobrands/fixmystreet/fixmystreet.js | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/web/cobrands/fixmystreet/fixmystreet.js b/web/cobrands/fixmystreet/fixmystreet.js index 2f0a48385..6352ac4dc 100644 --- a/web/cobrands/fixmystreet/fixmystreet.js +++ b/web/cobrands/fixmystreet/fixmystreet.js @@ -630,7 +630,7 @@ $.extend(fixmystreet.set_up, { var $context = $(this); var $originalLabel = $('[for="form_photo"], .js-photo-label', $context); var $originalInput = $('#form_photos, .js-photo-fields', $context); - var $dropzone = $('<div>').addClass('dropzone'); + var $dropzone = $('<div tabindex=0>').addClass('dropzone'); $originalLabel.removeAttr('for'); $('[data-plural]', $originalLabel).text( @@ -698,6 +698,12 @@ $.extend(fixmystreet.set_up, { } }); + $dropzone.on('keydown', function(e) { + if (e.keyCode === 13 || e.keyCode === 32) { + $dropzone.click(); + } + }); + $.each($('input[name=upload_fileid]', $context).val().split(','), function(i, f) { if (!f) { return; |