Skip to content

Commit b1bc4fc

Browse files
committed
fix: include escape key for blurring FormControl
1 parent 51b1db4 commit b1bc4fc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/components/MusicPlayer.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ export const MusicPlayer: React.FC<IMusicPlayerProps> = (props) => {
5959
};
6060

6161
const handleInputKeyDown = (e: React.KeyboardEvent<HTMLInputElement>) => {
62-
if (e.key === 'Enter') {
62+
if (e.key === 'Enter' || e.key === 'Escape') {
6363
(e.target as HTMLInputElement).blur();
6464
}
6565
};

0 commit comments

Comments
 (0)