facebook / Rapid

The OpenStreetMap editor driven by open data, AI, and supercharged features
https://rapideditor.org
ISC License
509 stars 92 forks source link

Location access request keeps returning every few seconds on Firefox #1550

Open VLD280 opened 1 week ago

VLD280 commented 1 week ago

Description

The firefox pop-up asking "allow rapideditor.org to access your location?" that is triggered when you click the "show my location" button will not go away. The only wasy to get rid of it is to refresh the page, and it will re appear if you try to show your location again. Disabling my UBlock Origin plugin did not resolve the issue.

Screenshots

Screenshot 2024-09-10 at 10 57 01 AM

https://github.com/user-attachments/assets/33fcc5b4-6401-4e7c-9543-1714bc517cf5

Version

2.4.0-pre.0

What browser are you seeing the problem on? What version are you running?

Firefox v130.0

The OS you're using

mac

Steps to reproduce

  1. Log into Rapid
  2. Select "show my location" button in the right hand tool bar
  3. When the firefox pop-up box appears in the top left corner of the screen asking "allow rapideditor.org to access your location?", select allow
  4. if MacOS generates a dialog box asking if you want to allow the firefox app to access your location, select allow.
  5. the pop-up box from step 3 will reappear.
  6. every time you click allow, it will reappear a few seconds later.

The browser URL at the time you encountered the bug

https://rapideditor.org/canary#map=20.00/39.06760/-108.55991&background=Bing&datasets=fbRoads,msBuildings&disable_features=boundaries&id=n5089345141

The auto-detected useragent string for your browser (leave blank if you're manually filling this form out)

Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:130.0) Gecko/20100101 Firefox/130.0

bhousel commented 1 week ago

Thanks, it does look like we could use the Geolocation API better, we can register a listener that will report the user's location as it moves around, rather than us just asking for the current position every few seconds.