Skip to content

Commit 17b9599

Browse files
committed
fix drawer height
1 parent 5eef0dc commit 17b9599

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

ui/src/ui/BottomSheet.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,10 @@ export const BottomSheet = (props: Props) => {
135135
<div
136136
style={{
137137
flexShrink: 0,
138-
height: `${keyboardHeight}px`,
138+
// ネイティブから来る高さは画面下端との重なりなのでsafe area分を含んでいる。
139+
// シート自体がpaddingBottomでsafe areaを確保しているため、
140+
// 引かずに使うとキーボードとの間が二重に空く
141+
height: `max(0px, calc(${keyboardHeight}px - env(safe-area-inset-bottom)))`,
139142
transition: `height ${props.keyboardInset.duration}s ease-out`
140143
}}
141144
/>

0 commit comments

Comments
 (0)