File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
packages/core/useFullscreen Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change 1
1
import type { ConfigurableDocument } from '../_configurable'
2
2
import type { MaybeElementRef } from '../unrefElement'
3
- import { tryOnScopeDispose } from '@vueuse/shared'
3
+ import { tryOnMounted , tryOnScopeDispose } from '@vueuse/shared'
4
4
import { computed , shallowRef } from 'vue'
5
5
import { defaultDocument } from '../_configurable'
6
6
import { unrefElement } from '../unrefElement'
@@ -160,6 +160,8 @@ export function useFullscreen(
160
160
useEventListener ( document , eventHandlers , handlerCallback , listenerOptions )
161
161
useEventListener ( ( ) => unrefElement ( targetRef ) , eventHandlers , handlerCallback , listenerOptions )
162
162
163
+ tryOnMounted ( handlerCallback , false )
164
+
163
165
if ( autoExit )
164
166
tryOnScopeDispose ( exit )
165
167
You can’t perform that action at this time.
0 commit comments