Skip to content

Commit

Permalink
chore: added logger to debug issues in release variants
Browse files Browse the repository at this point in the history
  • Loading branch information
kirillzyusko committed Dec 27, 2024
1 parent 323c7c6 commit 42defa5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/components/KeyboardAwareScrollView/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,7 @@ const KeyboardAwareScrollView = forwardRef<
return;
}

console.debug("maybeScroll - onChangeText");
scrollFromCurrentPosition(customHeight);
},
[scrollFromCurrentPosition],
Expand All @@ -255,6 +256,7 @@ const KeyboardAwareScrollView = forwardRef<
"worklet";

if (e.selection.start.position !== e.selection.end.position) {
console.debug("onSelectionChange - onChangeText");
scrollFromCurrentPosition(e.selection.end.y);
}

Expand Down Expand Up @@ -320,6 +322,7 @@ const KeyboardAwareScrollView = forwardRef<
if (focusWasChanged && !keyboardWillAppear.value) {
// update position on scroll value, so `onEnd` handler
// will pick up correct values
console.debug("maybeScroll - onStart");
position.value += maybeScroll(e.height, true);
}
},
Expand All @@ -330,6 +333,7 @@ const KeyboardAwareScrollView = forwardRef<

// if the user has set disableScrollOnKeyboardHide, only auto-scroll when the keyboard opens
if (!disableScrollOnKeyboardHide || keyboardWillAppear.value) {
console.debug("maybeScroll - onMove");
maybeScroll(e.height);
}
},
Expand All @@ -355,6 +359,7 @@ const KeyboardAwareScrollView = forwardRef<
const prevLayout = layout.value;

layout.value = input.value;
console.debug("maybeScroll - animated reaction");
scrollPosition.value += maybeScroll(keyboardHeight.value, true);
layout.value = prevLayout;
}
Expand Down

0 comments on commit 42defa5

Please sign in to comment.