Skip to content

Commit afaf76b

Browse files
committed
fix: don't scroll in the end if such behavior is explicitly disabled
1 parent bf12b9e commit afaf76b

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

  • src/components/KeyboardAwareScrollView

src/components/KeyboardAwareScrollView/index.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,10 @@ const KeyboardAwareScrollView = forwardRef<
462462
onEnd: (e) => {
463463
"worklet";
464464

465-
maybeScroll(e.height);
465+
// if the user has set disableScrollOnKeyboardHide, only auto-scroll when the keyboard opens
466+
if (!disableScrollOnKeyboardHide || keyboardWillAppear.value) {
467+
maybeScroll(e.height);
468+
}
466469

467470
removeGhostPadding(e.height);
468471

0 commit comments

Comments
 (0)