mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2024-11-23 15:47:53 -05:00
Allow space to trigger submit on project tiles in modal because they are buttons
This commit is contained in:
parent
f222dec925
commit
5892f2e7ba
1 changed files with 6 additions and 1 deletions
|
@ -29,7 +29,12 @@ const UserProjectsTile = ({id, title, image, inStudio, onAdd, onRemove}) => {
|
|||
'mod-mutating': submitting
|
||||
})}
|
||||
onClick={toggle}
|
||||
onKeyDown={e => e.key === 'Enter' && toggle()}
|
||||
onKeyDown={e => {
|
||||
if (e.key === 'Enter' || e.key === ' ') {
|
||||
toggle();
|
||||
e.preventDefault();
|
||||
}
|
||||
}}
|
||||
>
|
||||
<img
|
||||
className="studio-project-image"
|
||||
|
|
Loading…
Reference in a new issue