From 1a967571f2860ebd150249d67d7a4e7dcf1323b3 Mon Sep 17 00:00:00 2001 From: nklhrstv Date: Sat, 28 Mar 2020 17:32:27 +0200 Subject: [PATCH] allow user to prevent spatial navigation with shift key --- .../Intro/CredentialsTextInput/CredentialsTextInput.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/routes/Intro/CredentialsTextInput/CredentialsTextInput.js b/src/routes/Intro/CredentialsTextInput/CredentialsTextInput.js index 4c200c702..bde7dd9a2 100644 --- a/src/routes/Intro/CredentialsTextInput/CredentialsTextInput.js +++ b/src/routes/Intro/CredentialsTextInput/CredentialsTextInput.js @@ -13,10 +13,12 @@ const CredentialsTextInput = React.forwardRef((props, ref) => { event.nativeEvent.spatialNavigationPrevented = true; } - if (event.key === 'ArrowDown') { - window.navigate('down'); - } else if (event.key === 'ArrowUp') { - window.navigate('up'); + if (!event.shiftKey) { + if (event.key === 'ArrowDown') { + window.navigate('down'); + } else if (event.key === 'ArrowUp') { + window.navigate('up'); + } } } }, [props.onKeyDown]);