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.
📜 Description
parentScrollViewTarget
returns only verticalScrollView
.💡 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 renderHorizontalScrollView
so will not go intoif (parentView is ScrollView) {
statement.To achieve a similar behavior on iOS I added a check where compare
frame
andcontentSize
to assure thatScrollView
is a vertical.Closes https://github.com/kirillzyusko/react-native-keyboard-controller/issues/442
📢 Changelog
iOS
frame
andcontentSize
to assure thatScrollView
is a vertical for detectionparentScrollViewTarget
;🤔 How Has This Been Tested?
Tested on iPhone 14 Pro.
📸 Screenshots (if appropriate):
📝 Checklist