File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -327,7 +327,7 @@ useShortcuts({
327327 <!-- Mobile: Search button (expands search) -->
328328 <ButtonBase
329329 type="button"
330- class="sm:hidden ms-auto"
330+ class="sm:hidden ms-auto py-2. 5 ! "
331331 :aria-label =" $t (' nav.tap_to_search' )"
332332 :aria-expanded =" showMobileMenu "
333333 @click =" expandMobileSearch "
@@ -338,7 +338,7 @@ useShortcuts({
338338 <!-- Mobile: Menu button (always visible, click to open menu) -->
339339 <ButtonBase
340340 type="button"
341- class="sm:hidden "
341+ class="sm:hidden py-2. 5 ! "
342342 :aria-label =" $t (' nav.open_menu' )"
343343 :aria-expanded =" showMobileMenu "
344344 @click =" showMobileMenu = ! showMobileMenu "
Original file line number Diff line number Diff line change @@ -30,10 +30,21 @@ function clearSearch() {
3030
3131// Expose focus method for parent components
3232const inputRef = useTemplateRef (' inputRef' )
33+ function handleFocus() {
34+ isSearchFocused .value = true
35+ emit (' focus' )
36+ }
37+ function handleBlur() {
38+ isSearchFocused .value = false
39+ emit (' blur' )
40+ }
3341function focus() {
3442 inputRef .value ?.focus ()
3543}
36- defineExpose ({ focus })
44+ function blur() {
45+ inputRef .value ?.blur ()
46+ }
47+ defineExpose ({ focus , blur })
3748 </script >
3849<template >
3950 <search v-if =" showSearchBar" :class =" 'flex-1 sm:max-w-md ' + inputClass" >
@@ -60,8 +71,8 @@ defineExpose({ focus })
6071 :placeholder =" $t (' search.placeholder' )"
6172 no-correct
6273 class="w-full min-w-25 ps-7 pe-8"
63- @focus =" isSearchFocused = true "
64- @blur =" isSearchFocused = false "
74+ @focus =" handleFocus "
75+ @blur =" handleBlur "
6576 size="sm"
6677 ariaKeyshortcuts="/"
6778 />
You can’t perform that action at this time.
0 commit comments