8000 fix(useScreenSafeArea): сhanged initial value update by whiteyebrw · Pull Request #4789 · vueuse/vueuse · GitHub
[go: up one dir, main page]

Skip to content

fix(useScreenSafeArea): сhanged initial value update #4789

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 7, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix(useScreenSafeArea): сhanged initial value update
  • Loading branch information
whiteyebrw committed May 30, 2025
commit fedcf462045a682f05f21d8343b4427e0320901f
4 changes: 2 additions & 2 deletions packages/core/useScreenSafeArea/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { isClient, useDebounceFn } from '@vueuse/shared'
import { isClient, tryOnMounted, useDebounceFn } from '@vueuse/shared'
import { shallowRef } from 'vue'
import { useCssVar } from '../useCssVar'
import { useEventListener } from '../useEventListener'
Expand Down Expand Up @@ -30,7 +30,7 @@ export function useScreenSafeArea() {
bottomCssVar.value = 'env(safe-area-inset-bottom, 0px)'
leftCssVar.value = 'env(safe-area-inset-left, 0px)'

update()
tryOnMounted(update)

useEventListener('resize', useDebounceFn(update), { passive: true })
}
Expand Down
0