Skip to content

fix: add timeout to geolocation request#1

Merged
giancarloerra merged 1 commit intomainfrom
fix/geolocation-timeout
Mar 10, 2026
Merged

fix: add timeout to geolocation request#1
giancarloerra merged 1 commit intomainfrom
fix/geolocation-timeout

Conversation

@giancarloerra
Copy link
Owner

Problem

Clicking "Use my location" on the settings page asks for permission but then nothing happens.
getCurrentPosition had no timeout, so on desktops (no GPS hardware) Chrome hangs indefinitely
waiting for a position fix.

Fix

  • Added timeout: 15000 and maximumAge: 300000 options to getCurrentPosition
  • Added "Locating…" toast for immediate feedback after permission is granted
  • Improved error callback with specific messages for denial, unavailability, and timeout

@giancarloerra giancarloerra self-assigned this Mar 10, 2026
@giancarloerra giancarloerra merged commit 6f643de into main Mar 10, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant