fix: hotkeys back working

Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
2026-04-26 06:45:37 +02:00
parent 29922b8058
commit 8258b044b1
8 changed files with 93 additions and 3 deletions

View File

@@ -32,7 +32,18 @@ document.addEventListener("DOMContentLoaded", () => {
const liveSocket = new LiveView.LiveSocket("/live", Phoenix.Socket, {
params: { _csrf_token: csrfToken },
hooks: Hooks
hooks: Hooks,
metadata: {
keydown: (event) => ({
key: event.key,
meta: event.metaKey,
ctrl: event.ctrlKey,
alt: event.altKey,
shift: event.shiftKey,
tag: event.target?.tagName || null,
contentEditable: event.target?.isContentEditable || false
})
}
});
liveSocket.connect();