mirror of
https://github.com/Prowlarr/Prowlarr
synced 2026-04-24 22:00:49 +02:00
Fixed: (UI) Use event.composedPath()
This commit is contained in:
parent
f90d66376e
commit
88329ff104
1 changed files with 6 additions and 1 deletions
|
|
@ -84,6 +84,10 @@ class SearchIndex extends Component {
|
|||
}
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
window.removeEventListener('keyup', this.onKeyUp);
|
||||
}
|
||||
|
||||
//
|
||||
// Control
|
||||
|
||||
|
|
@ -192,7 +196,8 @@ class SearchIndex 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…
Reference in a new issue