Skip to content

bug: Inconsistent State on Browser Back/Forward #558

Description

@Aditya8369
  • Description: In App.jsx, the handlePopState effect updates the position and selectedCity from the URL hash. However, if the user navigates back to a state where there is no hash, it calls setSelectedCity("auto") but doesn't trigger the geolocation flow, potentially leaving the UI in an inconsistent state (e.g., showing the previous city's data but with "auto" selected).
  • Fix/Enhancement: Modify the handlePopState function to explicitly trigger the geolocation flow when falling back to the "auto" state, ensuring the UI correctly updates to the user's current location.

Metadata

Metadata

Labels

ECSoC26Contributions considered under ECSoC'26

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions