We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b171893 commit 09cbd3eCopy full SHA for 09cbd3e
packages/core/useFullscreen/index.ts
@@ -1,6 +1,6 @@
1
import type { ConfigurableDocument } from '../_configurable'
2
import type { MaybeElementRef } from '../unrefElement'
3
-import { tryOnScopeDispose } from '@vueuse/shared'
+import { tryOnMounted, tryOnScopeDispose } from '@vueuse/shared'
4
import { computed, shallowRef } from 'vue'
5
import { defaultDocument } from '../_configurable'
6
import { unrefElement } from '../unrefElement'
@@ -160,6 +160,8 @@ export function useFullscreen(
160
useEventListener(document, eventHandlers, handlerCallback, listenerOptions)
161
useEventListener(() => unrefElement(targetRef), eventHandlers, handlerCallback, listenerOptions)
162
163
+ tryOnMounted(handlerCallback, false)
164
+
165
if (autoExit)
166
tryOnScopeDispose(exit)
167
0 commit comments