Skip to content

Commit 7d2295e

Browse files
committed
fix: glitching when height exceeds window height;
1 parent ff57c2f commit 7d2295e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/BottomSheet.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ const handleDrag: Handler<'drag', PointerEvent> | undefined = ({ delta }) => {
166166
}
167167
168168
set({
169-
height: height.value >= windowHeight.value ? windowHeight.value : rubberbandIfOutOfBounds(height.value, 0, maxSnap.value, 0.25),
169+
height: Math.min(Math.max(rubberbandIfOutOfBounds(height.value, 0, maxSnap.value, 0.25), 0), windowHeight.value),
170170
})
171171
}
172172

0 commit comments

Comments
 (0)