Sri
Sri

Reputation: 5845

Firefox 11 and GeoLocation denial callback

Things worked okay is Firefox 10.x but with the upgrade to Firefox 11 has thrown up a problem.

I use

navigator.geolocation.getCurrentPosition(success, failure)

but in FF11 the failure callback is not executed when the user denies sharing location by selecting "Not Now".

Any suggestions?

Upvotes: 5

Views: 1052

Answers (2)

Radek Pech
Radek Pech

Reputation: 3098

Actually you get the error callback in Firefox ONLY if you click Never share location.

Because when you click Not now (or just close the popup), you can still click the location icon in address bar and allow it later.

(tested on FF28)

edit: here is a demo of how to detect location with special note for Firefox.

Upvotes: 0

Sri
Sri

Reputation: 5845

Okay, so the answer for now is: "Not possible, Firefox by design will not fire the failure event. Build your app around this constraint."

Upvotes: 3

Related Questions