We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 89c7884 commit d2f6f9dCopy full SHA for d2f6f9d
1 file changed
packages/ui-default/utils/base.ts
@@ -184,9 +184,7 @@ export const request = {
184
};
185
186
export async function withTransitionCallback(callback: () => (Promise<void> | void)) {
187
- // @ts-ignore
188
- if (!document.startViewTransition) return callback?.();
189
+ if (!document.startViewTransition || document.visibilityState === 'hidden') return callback?.();
190
const transition = document.startViewTransition(callback);
191
return await transition.finished;
192
}
0 commit comments