Remove broken phx-window-keydown directives

This commit is contained in:
Claudio Ortolina
2025-07-06 09:18:03 +01:00
parent b86e8abd52
commit 29986b7041
2 changed files with 1 additions and 18 deletions
@@ -23,21 +23,6 @@ defmodule MusicLibraryWeb.UniversalSearchLive.Index do
{:noreply, assign(socket, :show_modal, true)} {:noreply, assign(socket, :show_modal, true)}
end end
@impl true
def handle_event("global_key_handler", %{"key" => "k", "ctrlKey" => true}, socket) do
{:noreply, assign(socket, :show_modal, true)}
end
@impl true
def handle_event("global_key_handler", %{"key" => "k", "metaKey" => true}, socket) do
{:noreply, assign(socket, :show_modal, true)}
end
@impl true
def handle_event("global_key_handler", _params, socket) do
{:noreply, socket}
end
@impl true @impl true
def handle_event("close_modal", _params, socket) do def handle_event("close_modal", _params, socket) do
{:noreply, {:noreply,
@@ -1,9 +1,7 @@
<div phx-window-keydown="global_key_handler" phx-key="keydown" id="universal-search-root"> <div id="universal-search-root">
<div <div
:if={@show_modal} :if={@show_modal}
class="fixed inset-0 z-50 flex items-start justify-center pt-16 px-4 pb-6 sm:pt-24" class="fixed inset-0 z-50 flex items-start justify-center pt-16 px-4 pb-6 sm:pt-24"
phx-window-keydown="key_navigation"
phx-key="keydown"
> >
<!-- Modal backdrop --> <!-- Modal backdrop -->
<div <div