Commit acbc7ae
authored
fix: wrong
## 📜 Description
Fixed wrong event for "end" keyboard movement after interactive
dismissal (when keyboard gets shown after interaction).
## 💡 Motivation and Context
Originally reported by @pioner92 months ago and later raised as an issue
by @iankberry
It's a known issue that in `onEnd` we may get out-of-dated keyboard
frame metrics. The fix that I used earlier was postponing the event a
little bit if it was interactive dismissal. It fixed the issue for my
pixel device in
#814
However if we test Samsung device we can clearly see that the bug is
reproducible again. In this PR I'm continue to use the idea introduced
in
#814
and just use larger delay. It fixes the problem, but I'll conduct an
exploration for a better/more synchronous code. I started this
investigation in
#1017
and I plan to return to this PR soon 👀 (but for now we'll merge a
workaround)
Closes
#1238
## 📢 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
- added `onEnd` handler in "Interactive Keyboard" example
### Android
- added `UIThread` constants;
- use `.postDelayed()` instead of `.post()` with one frame delay;
## 🤔 How Has This Been Tested?
Tested manually on Samsung S25+, Android 15 (Remote test lab) in example
app.
## 📸 Screenshots (if appropriate):
|Before|After|
|-------|-----|
|<video
src="https://github.com/user-attachments/assets/45e63086-e49f-4b53-b4c1-647045021709">|<video
src="https://github.com/user-attachments/assets/bafc21c1-49f3-4ea0-a248-1d587feedfbc">|
## 📝 Checklist
- [x] CI successfully passed
- [x] I added new mocks and corresponding unit-tests if library API was
changedonEnd event on Samsung devices when keyboard gets shown after interactive dismissal (#1240)1 parent 29afc30 commit acbc7ae
File tree
4 files changed
+54
-26
lines changed- FabricExample/src/screens/Examples/InteractiveKeyboard
- android/src/main/java/com/reactnativekeyboardcontroller
- constants
- listeners
- example/src/screens/Examples/InteractiveKeyboard
4 files changed
+54
-26
lines changedLines changed: 21 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
27 | | - | |
28 | | - | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
29 | 30 | | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
36 | 43 | | |
37 | | - | |
38 | | - | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
39 | 47 | | |
40 | | - | |
| 48 | + | |
| 49 | + | |
41 | 50 | | |
42 | 51 | | |
43 | 52 | | |
| |||
Lines changed: 9 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
Lines changed: 3 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| |||
334 | 335 | | |
335 | 336 | | |
336 | 337 | | |
337 | | - | |
338 | | - | |
| 338 | + | |
| 339 | + | |
339 | 340 | | |
340 | 341 | | |
341 | 342 | | |
| |||
Lines changed: 21 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
27 | | - | |
28 | | - | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
29 | 30 | | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
36 | 43 | | |
37 | | - | |
38 | | - | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
39 | 47 | | |
40 | | - | |
| 48 | + | |
| 49 | + | |
41 | 50 | | |
42 | 51 | | |
43 | 52 | | |
| |||
0 commit comments