Skip to content

Commit b14baca

Browse files
committed
fix: use correct bottom offsets when keyboard is open
1 parent 6e15d60 commit b14baca

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/hooks/useOffsets.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,10 @@ export const useOffsets = ({
2121

2222
const top = safeAreaInsets.top + (additionalOffsets?.top ?? 0);
2323
const right = safeAreaInsets.right + (additionalOffsets?.right ?? 0);
24-
const bottom =
25-
Math.max(safeAreaInsets.bottom, finalKeyboardOffset) +
26-
(additionalOffsets?.bottom ?? 0);
24+
const bottom = Math.max(
25+
safeAreaInsets.bottom + (additionalOffsets?.bottom ?? 0),
26+
finalKeyboardOffset
27+
);
2728
const left = safeAreaInsets.left + (additionalOffsets?.left ?? 0);
2829

2930
switch (position) {

0 commit comments

Comments
 (0)