Skip to content

Commit

Permalink
fix(android): fix android scroll issue in bottom sheet
Browse files Browse the repository at this point in the history
  • Loading branch information
EQuimper committed May 30, 2024
1 parent 3bb4d36 commit 3592222
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Provider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,11 @@ export function useFormSmartScroll({
currentFocus.position + wrapperOffset >
_keyboard.coordinates.end.screenY - currentFocus.height * 2
) {
return -currentFocus.height;
if (wrapperOffset) {
return -Math.abs(currentFocus.height + wrapperOffset);
}

return -Math.abs(currentFocus.height / 4);
}

return 0;
Expand Down

0 comments on commit 3592222

Please sign in to comment.