1
0
Fork 0
mirror of https://github.com/Radarr/Radarr synced 2024-12-23 00:12:44 +00:00

Fix issue with arrow keys switching movie when using them inside a textbox (or any element really)

This commit is contained in:
nitsua 2020-09-28 12:13:07 -04:00 committed by ta264
parent 081fe64bff
commit cf804f7dac

View file

@ -177,11 +177,13 @@ class MovieDetails extends Component {
}
onKeyUp = (event) => {
if (event.keyCode === keyCodes.LEFT_ARROW) {
this.props.onGoToMovie(this.props.previousMovie.titleSlug);
}
if (event.keyCode === keyCodes.RIGHT_ARROW) {
this.props.onGoToMovie(this.props.nextMovie.titleSlug);
if (event.path.length === 4) {
if (event.keyCode === keyCodes.LEFT_ARROW) {
this.props.onGoToMovie(this.props.previousMovie.titleSlug);
}
if (event.keyCode === keyCodes.RIGHT_ARROW) {
this.props.onGoToMovie(this.props.nextMovie.titleSlug);
}
}
}