Fixed: TypeError on Keyup in Firefox for MovieIndex and Details

pull/5427/head
Qstick 4 years ago
parent 4c19fa0d05
commit e104a9e261

@ -178,7 +178,7 @@ class MovieDetails extends Component {
}
onKeyUp = (event) => {
if (event.path.length === 4) {
if (event.composedPath && event.composedPath().length === 4) {
if (event.keyCode === keyCodes.LEFT_ARROW) {
this.props.onGoToMovie(this.props.previousMovie.titleSlug);
}

@ -246,7 +246,7 @@ class MovieIndex extends Component {
onKeyUp = (event) => {
const jumpBarItems = this.state.jumpBarItems.order;
if (event.path.length === 4) {
if (event.composedPath && event.composedPath().length === 4) {
if (event.keyCode === keyCodes.HOME && event.ctrlKey) {
this.setState({ jumpToCharacter: jumpBarItems[0] });
}

Loading…
Cancel
Save