$refs.searchInput.focus())" @keydown.enter.prevent="console.log('Enter key pressed. searchQuery:', searchQuery, 'Type:', typeof searchQuery, 'Raw value:', $event.target.value); (() => { const q = (searchQuery || '').trim(); const inputValue = $event.target.value || ''; const useValue = q || inputValue.trim(); console.log('Trimmed query:', q, 'Input value:', inputValue, 'Using:', useValue); const url = useValue ? '/hs-search-results?term=' + encodeURIComponent(useValue) : '/hs-search-results'; console.log('Redirecting to:', url); try { window.location.href = url; console.log('Location changed successfully'); } catch(e) { console.error('Error changing location:', e); } })()">