diff --git a/package.json b/package.json index 61a3bd6..41cd84d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ui", - "version": "6.3.49", + "version": "6.3.50", "license": "BUSL-1.1", "private": true, "packageManager": "pnpm@9.14.4", diff --git a/src/lib/components/ui/player/keybinds.svelte b/src/lib/components/ui/player/keybinds.svelte index 4f511c6..0a97306 100644 --- a/src/lib/components/ui/player/keybinds.svelte +++ b/src/lib/components/ui/player/keybinds.svelte @@ -6,7 +6,7 @@ import { keys, layout, type KeyCode } from './maps.ts' type Bind = Record> = T & { - fn: () => void + fn: (e: MouseEvent | KeyboardEvent) => void id: string code?: KeyCode } @@ -27,7 +27,7 @@ async function runBind (e: MouseEvent | KeyboardEvent, code: KeyCode) { if ('repeat' in e && e.repeat) return const kbn = get(binds) - if (await cnd(code)) kbn[layout[code] ?? code]?.fn() + if (await cnd(code)) kbn[layout[code] ?? code]?.fn(e) } export function loadWithDefaults (defaults: Partial>) { diff --git a/src/lib/components/ui/player/player.svelte b/src/lib/components/ui/player/player.svelte index a97fa48..4e6a350 100644 --- a/src/lib/components/ui/player/player.svelte +++ b/src/lib/components/ui/player/player.svelte @@ -492,7 +492,10 @@ desc: 'Toggle Stats' }, Space: { - fn: () => playPause(), + fn: (e) => { + e.preventDefault() + playPause() + }, id: 'play_arrow', icon: Play, type: 'icon',