Commit 338f0ec
authored
fix(Android, FormSheet): Fix pressables with TextInput for Fabric (#3435)
## Description
This PR addresses an issue where pressables became unresponsive when the
keyboard was open and a FormSheet had been adjusted for keyboard height.
Previously, after introducing support for offsetting FormSheets by the
keyboard height, I overlooked updating the corresponding ShadowNodes to
reflect this layout change.
Note: this only applies on Fabric, where we need to pass offsetY to
ShadowNodes.
Fixes:
software-mansion/react-native-screens-labs#607
## Changes
- Added a callback to notify and update ShadowNodes when the FormSheet
layout shifts due to keyboard visibility.
## Screenshots / GIFs
Here you can add screenshots / GIFs documenting your change.
You can add before / after section if you're changing some behavior.
### Before
https://github.com/user-attachments/assets/f5839b64-6a0c-43a7-ab27-7bb4f32aab05
### After
https://github.com/user-attachments/assets/db7ac121-74d9-4169-bd6c-665852351692
## Test code and steps to reproduce
Updated `Test3336`
## Checklist
- [x] Included code example that can be used to test this change
- [x] Ensured that CI passes1 parent 5b9a862 commit 338f0ec
4 files changed
Lines changed: 47 additions & 1 deletion
File tree
- android/src/main/java/com/swmansion/rnscreens
- bottomsheet
- apps/src/tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
491 | 491 | | |
492 | 492 | | |
493 | 493 | | |
494 | | - | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
495 | 502 | | |
496 | 503 | | |
497 | 504 | | |
| |||
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
280 | 280 | | |
281 | 281 | | |
282 | 282 | | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
283 | 289 | | |
284 | 290 | | |
285 | 291 | | |
| |||
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
519 | 519 | | |
520 | 520 | | |
521 | 521 | | |
| 522 | + | |
| 523 | + | |
522 | 524 | | |
523 | 525 | | |
524 | 526 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| 40 | + | |
40 | 41 | | |
41 | 42 | | |
42 | 43 | | |
| |||
70 | 71 | | |
71 | 72 | | |
72 | 73 | | |
| 74 | + | |
73 | 75 | | |
74 | 76 | | |
75 | 77 | | |
| |||
198 | 200 | | |
199 | 201 | | |
200 | 202 | | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
201 | 220 | | |
202 | 221 | | |
203 | 222 | | |
| |||
443 | 462 | | |
444 | 463 | | |
445 | 464 | | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
446 | 477 | | |
447 | 478 | | |
448 | 479 | | |
| |||
0 commit comments