Closed Bug 1373715 Opened 7 years ago Closed 5 years ago

navigator.geolocation.clearWatch() does not clear the watchPosition()

Categories

(Core :: DOM: Geolocation, defect)

54 Branch
defect
Not set
normal

Tracking

()

RESOLVED INACTIVE

People

(Reporter: tyler.vorpahl, Unassigned)

Details

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.86 Safari/537.36

Steps to reproduce:

var id = navigator.geolocation.watchPosition(success, error, options)

I am trying to get the id returned by the watch for the geolocation API so I can clear it eventually.


Actual results:

There is no id returned by the watchPosition() call.


Expected results:

navigator.geolocation.clearWatch(id) does not clear the watch because the proper id is not returned.
Component: Untriaged → Geolocation
Product: Firefox → Core
Do you have a testcase that demonstrates this problem? WatchPosition definitely returns an id; we have automated tests that verify this.
Flags: needinfo?(tyler.vorpahl)
On closer inspection, a watchId is returned from navigator.geolocation.watchPosition()

However, when calling navigator.geolocation.clearWatch(watchId)... the success() callback continues to fire long after clearing the watch. 

This bug is much closer to the referenced issue above (1134713).
Flags: needinfo?(tyler.vorpahl)
Summary: navigator.geolocation.watchPosition() does not return an ID → navigator.geolocation.clearWatch() does not clear the watchPosition()

Closing due to inactivity, feel free to reopen if this is reproducible. clearWatch() works ok in my testing.

Status: UNCONFIRMED → RESOLVED
Closed: 5 years ago
Resolution: --- → INACTIVE
You need to log in before you can comment on or make changes to this bug.