Commit 6872736
authored
fix: automatically detect top border of
## 📜 Description
Automatically detect top border of `KeyboardAwareScrollView`.
## 💡 Motivation and Context
Continue the epic with better discovery of component location on the
screen and logical continuation of
#1346
In this PR I started to detect relative position of `ScrollView`, so
that I better understand if caret is not visible because it obscured by
other elements (header etc.) It's still not perfectly implemented and
there is still a "blind"/"dead" zone where text is already hidden but
scroll doesn't happen. I'll fix it in following PRs but for now I just
want to bring these changes to upcoming `1.21.0` release 🤞
We also can't use `measureInWindow` because it produces incorrect
measurements, so we need to use our custom implementation that has been
added in
#1355
Significantly improves UI for behavior described in
#1341
## 📢 Changelog
<!-- High level overview of important changes -->
<!-- For example: fixed status bar manipulation; added new types
declarations; -->
<!-- If your changes don't affect one of platform/language below - then
remove this platform/language -->
### JS
- auto detect position of `KeyboardAwareScrollView` on the screen to
better understand top border of the component relative to screen;
## 🤔 How Has This Been Tested?
Tested manually on iPhone 17 Pro (iOS 26.2, simulator).
## 📸 Screenshots (if appropriate):
https://github.com/user-attachments/assets/43fe233f-9c83-40c9-9642-a68e2d8e8e7c
## 📝 Checklist
- [x] CI successfully passed
- [x] I added new mocks and corresponding unit-tests if library API was
changedKeyboardAwareScrollView (#1352)1 parent eb2dfbb commit 6872736
1 file changed
Lines changed: 15 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| |||
150 | 151 | | |
151 | 152 | | |
152 | 153 | | |
| 154 | + | |
153 | 155 | | |
154 | 156 | | |
155 | 157 | | |
156 | 158 | | |
157 | | - | |
158 | | - | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
159 | 163 | | |
160 | 164 | | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
161 | 173 | | |
162 | 174 | | |
163 | 175 | | |
| |||
205 | 217 | | |
206 | 218 | | |
207 | 219 | | |
208 | | - | |
| 220 | + | |
209 | 221 | | |
210 | 222 | | |
211 | 223 | | |
| |||
0 commit comments