This adds an Android-only flag blurOnUnmount, that if true when calling push, pop, showModal, dismisModal, as well as when true on the component's static options(passProps) { ... } return value, will cause RNN to check for any focused views when the component the flag was passed for is being unmounted, and blur said view if it exists, causing not just the view to lose focus, but also the soft keyboard to be dismissed. We added this to our fork of RNN to tackle issues stemming from an inability to dismiss the soft keyboard on unmounting components, due to the disappear/unmount lifecycle events of the component coming too late for our keyboard dismissal calls to make it across the native<->js bridge before the component was unmounted. As this functionality is hidden behind a flag and does not alter base functionality, and the issue it seeks to solve might have been encountered by other users of RNN, I figured I might as well submit a PR to see if there is interest in merging this back into the base.
|
|
||
1 |
|
1 |
|
2 |
|
2 |
|
|
3 |
|
|
|
4 |
|
|
|
5 |
|
|
|
6 |
|
|
|
7 |
|
|
|
8 |
|
|
3 |
|
9 |
|
4 |
|
10 |
|
5 |
|
11 |
|
6 |
|
12 |
|
7 |
|
|
|
|
13 |
|
|
8 |
|
14 |
|
9 |
|
15 |
|
10 |
|
16 |
|
11 |
|
17 |
|
|
18 |
|
|
12 |
|
19 |
|
13 |
|
20 |
|
14 |
|
21 |
|
15 |
|
22 |
|
16 |
|
23 |
|
|
24 |
|
|
17 |
|
25 |
|
18 |
|
|
|
19 |
|
|
|
|
26 |
|
|
|
27 |
|
|
|
28 |
|
|
20 |
|
29 |
|
21 |
|
30 |
|
22 |
|
|
|
|
31 |
|
|
23 |
|
32 |
|
24 |
|
33 |
|
25 |
|
34 |
|
26 |
|
|
|
27 |
|
|
|
|
35 |
|
|
|
36 |
|
|
|
37 |
|
|
28 |
|
38 |
|
|
39 |
|
|
29 |
|
40 |
|
|
|
||
2 |
|
2 |
|
3 |
|
3 |
|
4 |
|
4 |
|
|
5 |
|
|
5 |
|
6 |
|
6 |
|
7 |
|
7 |
|
8 |
|
|
|
||
71 |
|
72 |
|
72 |
|
73 |
|
73 |
|
74 |
|
|
75 |
|
|
|
76 |
|
|
|
77 |
|
|
|
78 |
|
|
|
79 |
|
|
|
80 |
|
|
|
81 |
|
|
|
82 |
|
|
|
83 |
|
|
|
84 |
|
|
|
85 |
|
|
|
86 |
|
|
|
87 |
|
|
|
88 |
|
|
|
89 |
|
|
|
90 |
|
|
|
91 |
|
|
74 |
|
92 |
|
|
|
||
753 |
|
753 |
|
754 |
|
754 |
|
755 |
|
755 |
|
|
756 |
|
|
|
757 |
|
|
|
758 |
|
|
|
759 |
|
|
|
760 |
|
|
|
761 |
|
|
756 |
|
762 |
|