refactor: remove auto-scroll on stations loading
Some checks failed
linter / quality (push) Has been cancelled
tests / ci (8.3) (push) Has been cancelled
tests / ci (8.4) (push) Has been cancelled
tests / ci (8.5) (push) Has been cancelled

Disabled the watch hook that scrolled the viewport when station results
were loading. The 40px nudge disrupted user focus and was not needed
for usability.
This commit is contained in:
Ovidiu U
2026-04-30 09:01:11 +01:00
parent 895d55439b
commit 28061541d4

View File

@@ -448,12 +448,12 @@ const PRICE_SUFFIX = { monthly: '/mo', annual: '/yr' }
const { stations, meta, prediction, loading, error, search, reset } = useStations() const { stations, meta, prediction, loading, error, search, reset } = useStations()
const showFullPrediction = computed(() => Boolean(prediction.value) && !prediction.value.tier_locked) const showFullPrediction = computed(() => Boolean(prediction.value) && !prediction.value.tier_locked)
watch(loading, (isLoading) => { // watch(loading, (isLoading) => {
if (!isLoading) return // if (!isLoading) return
nextTick(() => { // nextTick(() => {
window.scrollBy({ top: 40, behavior: 'smooth' }) // window.scrollBy({ top: 40, behavior: 'smooth' })
}) // })
}) // })
const searchOrigin = computed(() => { const searchOrigin = computed(() => {
if (meta.value?.lat != null && meta.value?.lng != null) { if (meta.value?.lat != null && meta.value?.lng != null) {