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.38k stars 55 forks source link

fix: better horizontal `UIScrollView` detection #454

Closed kirillzyusko closed 1 month ago

kirillzyusko commented 1 month ago

📜 Description

Improved conditions for detecting horizontal ScrollView on iOS.

💡 Motivation and Context

If we compare height properties, then we may have a false positive case if ScrollView is not big enough and can not be actually scrolled because of its small size:

image

To fix the problem I decided to compare width property to properly detect horizontal ScrollView.

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

📢 Changelog

iOS

🤔 How Has This Been Tested?

Tested manually on iPhone 15 Pro (iOS 17.4).

📸 Screenshots (if appropriate):

https://github.com/kirillzyusko/react-native-keyboard-controller/assets/22820318/fde50481-b481-47ab-b23e-7417740ebed8

📝 Checklist

github-actions[bot] commented 1 month ago

📊 Package size report

Current size Target Size Difference
136086 bytes 136088 bytes -2 bytes 📉