Skip to content

Commit 42defa5

Browse files
committed
chore: added logger to debug issues in release variants
1 parent 323c7c6 commit 42defa5

File tree

1 file changed

+5
-0
lines changed
  • src/components/KeyboardAwareScrollView

1 file changed

+5
-0
lines changed

src/components/KeyboardAwareScrollView/index.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,7 @@ const KeyboardAwareScrollView = forwardRef<
242242
return;
243243
}
244244

245+
console.debug("maybeScroll - onChangeText");
245246
scrollFromCurrentPosition(customHeight);
246247
},
247248
[scrollFromCurrentPosition],
@@ -255,6 +256,7 @@ const KeyboardAwareScrollView = forwardRef<
255256
"worklet";
256257

257258
if (e.selection.start.position !== e.selection.end.position) {
259+
console.debug("onSelectionChange - onChangeText");
258260
scrollFromCurrentPosition(e.selection.end.y);
259261
}
260262

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

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

357361
layout.value = input.value;
362+
console.debug("maybeScroll - animated reaction");
358363
scrollPosition.value += maybeScroll(keyboardHeight.value, true);
359364
layout.value = prevLayout;
360365
}

0 commit comments

Comments
 (0)