react-native-external-keyboard 0.11.0 → 0.11.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -27,8 +27,26 @@ public class FocusableBase extends FocusHighlightBase {
|
|
|
27
27
|
syncFocusable();
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
+
// canBeFocused (and focusableWrapper) own this view's keyboard focusability.
|
|
31
|
+
// Clamp every setFocusable() call so external mutators can't force it on: RN's
|
|
32
|
+
// `accessible` prop (ReactViewManager#setAccessible -> setFocusable(true)) and the
|
|
33
|
+
// AndroidX ExploreByTouchHelper delegate that accessibilityRole/accessibilityActions
|
|
34
|
+
// installs (it sets focusable=true in its constructor). The child focus target is a
|
|
35
|
+
// separate view, so this only governs the container itself.
|
|
36
|
+
@Override
|
|
37
|
+
public void setFocusable(boolean focusable) {
|
|
38
|
+
super.setFocusable(focusable && canBeFocused && !focusableWrapper);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
@Override
|
|
42
|
+
public void setFocusable(int focusable) {
|
|
43
|
+
super.setFocusable(canBeFocused && !focusableWrapper ? focusable : View.NOT_FOCUSABLE);
|
|
44
|
+
}
|
|
45
|
+
|
|
30
46
|
protected void syncFocusable () {
|
|
31
47
|
View view = getFocusTargetView();
|
|
48
|
+
boolean containerFocus = !focusableWrapper && canBeFocused;
|
|
49
|
+
this.setFocusable(containerFocus);
|
|
32
50
|
if (view != null) {
|
|
33
51
|
view.setFocusable(canBeFocused);
|
|
34
52
|
}
|
package/package.json
CHANGED