Backport pull request #6496 from jellyfin-web/release-10.10.z

Skip prevented keyboard events

Original-merge: 5d8ab6a99b3b1e296d8207bac3ec5048eed366b8

Merged-by: thornbill <thornbill@users.noreply.github.com>

Backported-by: Joshua M. Boniface <joshua@boniface.me>
This commit is contained in:
dmitrylyzo
2025-02-03 12:29:42 -05:00
committed by Joshua M. Boniface
parent 08069a42d1
commit e8f03f605a
2 changed files with 4 additions and 0 deletions
+2
View File
@@ -125,6 +125,8 @@ export function isInteractiveElement(element) {
export function enable() {
const hasMediaSession = 'mediaSession' in navigator;
window.addEventListener('keydown', function (e) {
if (e.defaultPrevented) return;
// Skip modified keys
if (e.ctrlKey || e.altKey || e.metaKey || e.shiftKey) return;