camsys / onebusaway-nyc-atstop

21 stars 15 forks source link

Denying location on nearby view sometimes hangs at "loading" #7

Closed laidig closed 9 years ago

laidig commented 9 years ago

I have gotten it to happen twice:

Load in browser, Click nearby tab, Deny location request, See "Loading" stuck.

If does not get stuck, pull refresh and try again a couple times. By the third time, loading sticks.

Add a timeout to that location function that automatically cancels itself?

khfayzullaev commented 9 years ago

Yes, you are right. That should not happen. In case of Firefox, it is understandable - http://stackoverflow.com/questions/5947637/function-fail-never-called-if-user-declines-to-share-geolocation-in-firefox

However, this very bug can be seen on other browsers as well. Thanks for pointing out this issue. The one way to solve it would be to check how the $ionicLoading is shown and hidden later, that is, its order.

khfayzullaev commented 9 years ago

Commit 1845c5584540f3e97ad6761abeae64e51b7196a9 fixes the issue through a hack.