1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

Prevent more default actions for hotkeys

This commit is contained in:
Dmitry Lyzo 2024-09-14 00:18:33 +03:00
parent 4c68f500d9
commit b2676c1633
4 changed files with 13 additions and 0 deletions

View file

@ -138,14 +138,17 @@ export class BookPlayer {
case 'l':
case 'ArrowRight':
case 'Right':
e.preventDefault();
this.next();
break;
case 'j':
case 'ArrowLeft':
case 'Left':
e.preventDefault();
this.previous();
break;
case 'Escape':
e.preventDefault();
if (this.tocElement) {
// Close table of contents on ESC if it is open
this.tocElement.destroy();

View file

@ -180,6 +180,7 @@ export class ComicsPlayer {
onWindowKeyDown(e) {
const key = keyboardnavigation.getKeyName(e);
if (key === 'Escape') {
e.preventDefault();
this.stop();
}
}

View file

@ -97,14 +97,17 @@ export class PdfPlayer {
case 'l':
case 'ArrowRight':
case 'Right':
e.preventDefault();
this.next();
break;
case 'j':
case 'ArrowLeft':
case 'Left':
e.preventDefault();
this.previous();
break;
case 'Escape':
e.preventDefault();
this.stop();
break;
}