Remove broken phx-window-keydown directives
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user