For a web Application, when the user makes a choice of radio button on a previous unrelated field, I am trigerring location for the next step by calling attemptLocation().
const attemptLocation = () => {
if ("geolocation" in navigator) {
The possible scenarios are:
- A popup appears in browser and user allows the location immediately -
Works !
- The user clicks on 'Block' and location is not available. The user then realizes that they cannot proceed so they click on the location icon in browser and
allow
location.
How to detect this change they made from block
to allow
in the browser because right now
In Chrome: the page does not detect change to
allow
and users get stuck.In Firefox: Unless the user clicks
remember this selection
the browser keeps asking the sameallow or not
question even when user saidallow
and refreshed the page.In Edge: When the user changes to allow, location is updated and
works
but again only after they refresh the page and start over
To simplify the question: After page loads, the user who blocked location, changes from block to allow location, how can I alert ("thanks for changing from block location to allow location") ?