Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: detect only vertical ScrollView for
parentScrollViewTarget
(#443)
## 馃摐 Description `parentScrollViewTarget` returns only vertical `ScrollView`. ## 馃挕 Motivation and Context Actually it was an inconsistency between Android and iOS. On Android we are checking that instance belongs to `ScrollView`. If it's `<ScrollView horizontal` then on Android it'll render `HorizontalScrollView` so will not go into `if (parentView is ScrollView) {` statement. To achieve a similar behavior on iOS I added a check where compare `frame` and `contentSize` to assure that `ScrollView` is a vertical. Closes #442 ## 馃摙 Changelog ### iOS - compare `frame` and `contentSize` to assure that `ScrollView` is a vertical for detection `parentScrollViewTarget`; ## 馃 How Has This Been Tested? Tested on iPhone 14 Pro. ## 馃摳 Screenshots (if appropriate): |Before|After| |-------|-----| |![image](https://github.com/kirillzyusko/react-native-keyboard-controller/assets/22820318/85e46d85-318b-4866-9bb9-0ad669107ea5)|![image](https://github.com/kirillzyusko/react-native-keyboard-controller/assets/22820318/d3b1390a-c074-4f1b-ab2a-fc888901dad9)| ## 馃摑 Checklist - [x] CI successfully passed - [x] I added new mocks and corresponding unit-tests if library API was changed
- Loading branch information