Skip to content

Commit 32d4233

Browse files
committed
cleanup navigation resets
1 parent a70097c commit 32d4233

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

packages/vaul-svelte/src/lib/vaul.svelte.ts

+7
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,13 @@ class DrawerRootState {
303303
this.disablePreventScroll.current
304304
),
305305
});
306+
307+
$effect(() => {
308+
return () => {
309+
this.scaleBackground(false);
310+
this.positionFixedState.restorePositionSetting();
311+
};
312+
});
306313
}
307314

308315
setActiveSnapPoint = (newValue: number | string | null | undefined) => {

0 commit comments

Comments
 (0)