Reputation: 11089
I'm using the Geolocation API in this fairly simple way:
if (navigator && navigator.geolocation) {
navigator.geolocation.getCurrentPosition(function(position){
console.log("gettingPosition: " + position);
myFunction(position(;
}, function(error){
console.log('did not get position');
console.log(error);
});
}
In some cases (Firefox 12.0 is the browser I have in front of me) no callback fires if the user clicks "Not Now", not even the error. Is this expected? If so, is my only option to follow the technique in Geolocation feedback while accepting the request and set my own timeout?
Upvotes: 0
Views: 502
Reputation: 38151
This appears to be by design (for Firefox). See Josh's comments in https://bugzilla.mozilla.org/show_bug.cgi?id=635175
The logic is that clicking "not now" is a way for the user to dismiss the permission dialog without committing to a decision about whether or not to allow geolocation permissions.
It looks like FF16 and Chrome-Latest both operate this way.
(P.S. Don't shoot the messenger. :p)
Upvotes: 1