ui: give the "/" shortcut somewhere to go now the header search is gone
Deploy Ladill Link / deploy (push) Successful in 37s
Deploy Ladill Link / deploy (push) Successful in 37s
Removing the header search left ladill-link with no search input on an ordinary page, and ladill-search-shortcut.js calls preventDefault before it goes looking for one. So "/" was swallowed and did nothing — a dead key, which also blocked Firefox's own quick-find. Verified by running the real module against a simulated DOM: header search present, no body url -> focuses the header input header search gone, no body url -> prevented, focus nothing, go nowhere header search gone, body url set -> navigates to the links list Events and QR Plus already carried data-ladill-search-url on the body, so "/" there now opens their search page and needed no change. Only this app was missing it. The destination matches what the mobile Search tab already uses.
This commit is contained in:
@@ -14,7 +14,12 @@
|
||||
<link href="https://fonts.bunny.net/css?family=figtree:400,500,600&display=swap" rel="stylesheet" />
|
||||
@vite(['resources/css/app.css', 'resources/js/app.js'])
|
||||
</head>
|
||||
<body class="font-sans antialiased bg-slate-100" x-data="{ sidebarOpen: false }">
|
||||
{{-- data-ladill-search-url is what the "/" shortcut falls back to. With the header
|
||||
search gone there is no search input on an ordinary page, and the shortcut
|
||||
already calls preventDefault before it looks for one — so without this
|
||||
attribute "/" would be swallowed and do nothing. Points at the links list,
|
||||
the same place the mobile Search tab goes. --}}
|
||||
<body class="font-sans antialiased bg-slate-100" x-data="{ sidebarOpen: false }" data-ladill-search-url="{{ route('user.links.index') }}">
|
||||
<div class="min-h-screen max-lg:min-h-dvh">
|
||||
{{-- Mobile sidebar overlay --}}
|
||||
<div x-show="sidebarOpen" x-cloak class="fixed inset-0 z-30 bg-black/50 lg:hidden" @click="sidebarOpen = false"></div>
|
||||
|
||||
Reference in New Issue
Block a user