Skip to content

Commit

Permalink
[Dataviews] Fix: Space does not triggers the media button on grid vie…
Browse files Browse the repository at this point in the history
…w. (#67791)

Co-authored-by: jorgefilipecosta <[email protected]>
Co-authored-by: oandregal <[email protected]>
  • Loading branch information
3 people authored Dec 10, 2024
1 parent deb2d5d commit 7065f49
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,11 @@ export default function getClickableItemProps< Item >( {
onClickItem( item );
},
onKeyDown: ( event: React.KeyboardEvent ) => {
if ( event.key === 'Enter' || event.key === '' ) {
if (
event.key === 'Enter' ||
event.key === '' ||
event.key === ' '
) {
// Prevents onChangeSelection from triggering.
event.stopPropagation();
onClickItem( item );
Expand Down

1 comment on commit 7065f49

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Flaky tests detected in 7065f49.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/12257111435
📝 Reported issues:

Please sign in to comment.