2

In the depths of an application I need to use the Geolocation API.

    var that = this;

    if(Modernizr.geolocation){
      $(this).addClass("loading");

      navigator.geolocation.getCurrentPosition(function(position){
        that.handleGeoSuccess(position); // defined elsewhere
      },function(error){
        that.handleGeoError(error); // defined elsewhere
      }, {maxAge: 0, timeout: 1000});
    } else {
      that.handleGeoError(); // defined elsewhere
    }

This happens inside of a click-event. Chrome (25.0.1364.155) prompts for permission but none of the callbacks are fired, neither when accepting nor when denying geolocation information. Even asking again using setTimeout didn't work. No callbacks are fired.

I'm quite stuck here and don't know where to look. Any ideas?

btw it works in Firefox (19.0)and Safari (6.0.2), current Chrome Canary behaves the same.

nocksock
  • 5,369
  • 6
  • 38
  • 63
  • [This jsFiddle](http://jsfiddle.net/65szq/) works for me in Chrome and Firefox. Can you try it and report back? – Ben Mar 06 '13 at 17:33
  • @Ben sure that simple case works for me too. I tried to extract the problem in a simple case but couldn't :/ – nocksock Mar 06 '13 at 18:10

0 Answers0