kirillzyusko / react-native-keyboard-controller

Keyboard manager which works in identical way on both iOS and Android
https://kirillzyusko.github.io/react-native-keyboard-controller/
MIT License
1.4k stars 55 forks source link

fix: missing `onScroll` event in `KeyboardAwareScrollView` #408

Closed kirillzyusko closed 3 months ago

kirillzyusko commented 3 months ago

šŸ“œ Description

Fixed firing of onScroll in KeyboardAwareScrollView

šŸ’” Motivation and Context

Initially it was fixed in https://github.com/kirillzyusko/react-native-keyboard-controller/pull/339 and I'm sure it was working šŸ˜…

However it looks like in current setup (RN 0.73, REA 3.8.0) such way is not working and onScroll property still gets ignored šŸ˜”

So in this PR I followed a different path: initially I wanted to fire this handler via runOnJS, but we can not follow a full signature of the method, since REA has only nativeEvent property (and indeed in this case some properties would be simply missing).

The different path was to update a shared value from JS thread and call a callback as usually - it fixes a problem in old code and in a new, so for now this approach looks decent šŸ‘

Let's see how it works in a wild life šŸ‘€

Also in this PR I'm changing content of tea.yaml - it should be done in separate PR, but I don't want to open another PR just to fix quotes, so decided to merge everything in a single one šŸ™ˆ

Closes https://github.com/kirillzyusko/react-native-keyboard-controller/issues/337

šŸ“¢ Changelog

JS

FS (file system)

šŸ¤” How Has This Been Tested?

Tested manually on iPhone 15 Pro.

šŸ“ø Screenshots (if appropriate):

image

šŸ“ Checklist

github-actions[bot] commented 3 months ago

šŸ“Š Package size report

Current size Target Size Difference
130698 bytes 130819 bytes -121 bytes šŸ“‰