Merge pull request #19954 from gitstart/fix/arrow-keydown-events

Controls: Arrow keys don't work on number controls
This commit is contained in:
Jeppe Reinhold 2022-12-08 00:43:33 +01:00 committed by GitHub
commit 9e7ca4d187
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -85,7 +85,6 @@ export const useHighlighted = ({
const isArrowUp = matchesKeyCode('ArrowUp', event);
const isArrowDown = matchesKeyCode('ArrowDown', event);
if (!(isArrowUp || isArrowDown)) return;
event.preventDefault();
const requestId = globalWindow.requestAnimationFrame(() => {
globalWindow.cancelAnimationFrame(lastRequestId);