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.62k stars 67 forks source link

fix: use `dp` for selection events #436

Closed kirillzyusko closed 4 months ago

kirillzyusko commented 4 months ago

📜 Description

Use dp for selection events.

💡 Motivation and Context

If we pass values directly, then we will have incorrect positioning, because we are passing px while RN relies on dp. So in this PR we are converting all selection coordinates in dp and only then pass them.

📢 Changelog

Android

🤔 How Has This Been Tested?

Tested manually on Pixel 3a (API 33, emulator).

📸 Screenshots (if appropriate):

Before After
image image

Pay an attention to x coordinates 👀

📝 Checklist

github-actions[bot] commented 4 months ago

📊 Package size report

Current size Target Size Difference
136026 bytes 136031 bytes -5 bytes 📉