mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Skip number key navigation when key is modified
Pressing 0-9 seeks playback to the corresponding %. This overloaded browser tab switching when ALT/CTRL modifiers were active.
This commit is contained in:
parent
e1dee9d701
commit
e870cc733d
1 changed files with 5 additions and 2 deletions
|
@ -1131,6 +1131,7 @@ import 'css!assets/css/videoosd';
|
|||
clickedElement = e.target;
|
||||
|
||||
const key = keyboardnavigation.getKeyName(e);
|
||||
const isKeyModified = e.ctrlKey || e.altKey;
|
||||
|
||||
if (!currentVisibleMenu && 32 === e.keyCode) {
|
||||
playbackManager.playPause(currentPlayer);
|
||||
|
@ -1235,8 +1236,10 @@ import 'css!assets/css/videoosd';
|
|||
case '7':
|
||||
case '8':
|
||||
case '9': {
|
||||
const percent = parseInt(key, 10) * 10;
|
||||
playbackManager.seekPercent(percent, currentPlayer);
|
||||
if (!isKeyModified) {
|
||||
const percent = parseInt(key, 10) * 10;
|
||||
playbackManager.seekPercent(percent, currentPlayer);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue