meteor / mobile-packages

Meteor packages that provide functionality on mobile and desktop via Cordova plugins.
Other
339 stars 153 forks source link

Location permission prompt not showing up in browser when navigating to a route that uses Geolocation #89

Closed danielparas closed 3 years ago

danielparas commented 9 years ago

Hi, not sure if this is a browser bug or plugin bug. I have a particular route that uses Geolocation.latLng(). I am testing the situation for new users i.e. no location permission settings have ben set for the domain on which the meteor app is hosted.

  1. All works well when the route is access directly via it's URL. i.e. on accessing the route directly, browser (chrome) correctly prompts the user to ask permission to allow his/her location to be used.
  2. Does not work well when the route is navigated via a link/button within application interface. i.e. once the route is loaded, there is no prompt by the browser to ask permission to use the current location, neither is an error thrown by Geolocation.error() (remains null)

When tesitng on firefox and safari all works well in both cases. (Can this be a chrome bug?)

It's good to note that when location is allowed or denied to the domain beforehand, scenario 2 works well, in the sense that Geolocation.latLng() returns the location coordinates if previously allowed or Geolocation.error() returns the error message if prevously denied.

Other notes:

Thanks in advance for any insights on this matter!

Dan

StorytellerCZ commented 3 years ago

Could be a router issue or a browser thing if it works in FF and Safari. Either way I'm closing this issue due to age. Feel free to post here if this happens again.