Skip to content

Commit

Permalink
Update BackgroundImageControls to use 'ArrowDown' key for dropdown na…
Browse files Browse the repository at this point in the history
…vigation
  • Loading branch information
yogeshbhutkar committed Dec 23, 2024
1 parent 96a625a commit e1ec285
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ import {
__experimentalDropdownContentWrapper as DropdownContentWrapper,
Button,
} from '@wordpress/components';
import { DOWN } from '@wordpress/keycodes';
import { __, _x, sprintf } from '@wordpress/i18n';
import { store as noticesStore } from '@wordpress/notices';
import { getFilename } from '@wordpress/url';
Expand Down Expand Up @@ -379,7 +378,7 @@ function BackgroundImageControls( {
aria-haspopup="true"
onClick={ onToggle }
onKeyDown={ ( event ) => {
if ( event.keyCode === DOWN ) {
if ( event.key === 'ArrowDown' ) {
event.preventDefault();
event.target.click();
}
Expand Down

0 comments on commit e1ec285

Please sign in to comment.