allow user to prevent spatial navigation with shift key

This commit is contained in:
nklhrstv 2020-03-28 17:32:27 +02:00
parent 298f3ea10e
commit 1a967571f2

View file

@ -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]);