You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using the useGeolocation with the immediate option set to false it doesn't respect it and trigger the composable anyways. this makes the web page immediately prompt the user for permissions which can is not always the desired behaviour.
const{ coords, error, resume, pause }=useGeolocation({enableHighAccuracy: true,immediate: false});// this will always trigger
The solution as pointed in this comment seems to add the following
### Used Package Manager
pnpm
### Validations
- [X] Follow our [Code of Conduct](https://github.com/vueuse/vueuse/blob/main/CODE_OF_CONDUCT.md)
- [X] Read the [Contributing Guidelines](https://github.com/vueuse/vueuse/blob/main/CONTRIBUTING.md).
- [X] Read the [docs](https://vueuse.org/guide).
- [X] Check that there isn't [already an issue](https://github.com/vueuse/vueuse/issues) that reports the same bug to avoid creating a duplicate.
- [X] Make sure this is a VueUse issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to https://github.com/vuejs/core instead.
- [X] Check that this is a concrete bug. For Q&A open a [GitHub Discussion](https://github.com/vueuse/vueuse/discussions).
- [X] The provided reproduction is a [minimal reproducible example](https://stackoverflow.com/help/minimal-reproducible-example) of the bug.
The text was updated successfully, but these errors were encountered:
Describe the bug
When using the
useGeolocation
with theimmediate
option set tofalse
it doesn't respect it and trigger the composable anyways. this makes the web page immediately prompt the user for permissions which can is not always the desired behaviour.The solution as pointed in this comment seems to add the following
Reproduction
const { coords, error, resume, pause } = useGeolocation({ enableHighAccuracy: true, immediate: false });
System Info
The text was updated successfully, but these errors were encountered: