Open source, privacy-first web analytics. Lightweight, cookie-free Google Analytics alternative. Self-hosted or cloud.
TypeScript analyticsanalytics-dashboardclickhouseelixirgoogle-analyticsmarketingopen-source-analyticsphoenixplausible-analyticspostgresqlprivacyprivacy-friendlyself-hostedsimple-analyticsstatisticstailwindcssweb-analyticswebsite-analyticswebsite-statswebsite-tracking
Autofocus filter bars and don't insert "/" when activated via keyboard (#6099)
Adam Rutkowski40c1f8639b7f
diff --git a/lib/plausible_web/components/generic.ex b/lib/plausible_web/components/generic.exindex dcdd6cafd8..63c0e9917f 100644--- a/lib/plausible_web/components/generic.ex+++ b/lib/plausible_web/components/generic.ex@@ -1192,7 +1192,8 @@ defmodule PlausibleWeb.Components.Generic dox-ref="filter_text"phx-debounce={200}autocomoplete="off"- x-on:keydown.slash.window="if (['INPUT', 'TEXTAREA', 'SELECT'].includes(document.activeElement.tagName) || document.activeElement.isContentEditable) return; $refs.filter_text.focus(); $refs.filter_text.select();"+ autofocus+ x-on:keydown.slash.window="if (['INPUT', 'TEXTAREA', 'SELECT'].includes(document.activeElement.tagName) || document.activeElement.isContentEditable) return; $event.preventDefault(); $refs.filter_text.focus(); $refs.filter_text.select();"x-on:keydown.escape="$refs.filter_text.blur(); $refs.reset_filter?.dispatchEvent(new Event('click', {bubbles: true, cancelable: true}));"value={@filter_text}x-on:focus={"$refs.filter_text.placeholder = '#{@placeholder}';"}