react-native-tvos 0.79.7-0 → 0.79.7-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.
- package/Libraries/Components/TV/TVFocusGuideView.js +5 -3
- package/Libraries/Core/ReactNativeVersion.js +1 -1
- package/React/Base/RCTVersion.m +1 -1
- package/ReactAndroid/gradle.properties +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/views/modal/ReactModalHostView.kt +3 -1
- package/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactEditText.java +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/views/view/ReactViewGroup.java +15 -0
- package/ReactAndroid/src/main/java/com/facebook/react/views/view/ReactViewManager.kt +2 -3
- package/ReactCommon/cxxreact/ReactNativeVersion.h +1 -1
- package/package.json +2 -2
|
@@ -106,10 +106,12 @@ function TVFocusGuideView(
|
|
|
106
106
|
});
|
|
107
107
|
|
|
108
108
|
React.useEffect(() => {
|
|
109
|
-
if (
|
|
109
|
+
if (focusable === false) {
|
|
110
|
+
setDestinations([]);
|
|
111
|
+
} else if (destinationsProp !== null && destinationsProp !== undefined) {
|
|
110
112
|
setDestinations(destinationsProp); // $FlowFixMe[incompatible-call]
|
|
111
113
|
}
|
|
112
|
-
}, [setDestinations, destinationsProp]);
|
|
114
|
+
}, [setDestinations, destinationsProp, focusable]);
|
|
113
115
|
|
|
114
116
|
const enabledStyle = {display: enabled ? 'flex' : 'none'};
|
|
115
117
|
const style = [styles.container, props.style, enabledStyle];
|
|
@@ -126,7 +128,7 @@ function TVFocusGuideView(
|
|
|
126
128
|
style={style}
|
|
127
129
|
ref={_setNativeRef}
|
|
128
130
|
collapsable={false}
|
|
129
|
-
autoFocus={autoFocus}
|
|
131
|
+
autoFocus={focusable === false ? true : autoFocus}
|
|
130
132
|
// tvOS only prop
|
|
131
133
|
isTVSelectable={tvOSSelectable}
|
|
132
134
|
// Android TV only prop
|
package/React/Base/RCTVersion.m
CHANGED
|
@@ -168,7 +168,9 @@ public class ReactModalHostView(context: ThemedReactContext) :
|
|
|
168
168
|
public override fun removeViewAt(index: Int) {
|
|
169
169
|
UiThreadUtil.assertOnUiThread()
|
|
170
170
|
val child = getChildAt(index)
|
|
171
|
-
|
|
171
|
+
if (child != null) {
|
|
172
|
+
dialogRootViewGroup.removeView(child)
|
|
173
|
+
}
|
|
172
174
|
}
|
|
173
175
|
|
|
174
176
|
public override fun addChildrenForAccessibility(outChildren: ArrayList<View>) {
|
|
@@ -409,7 +409,7 @@ public class ReactEditText extends AppCompatEditText {
|
|
|
409
409
|
// that. This method will eventually replace requestFocusInternal()
|
|
410
410
|
private boolean requestFocusProgramatically() {
|
|
411
411
|
boolean focused = super.requestFocus(View.FOCUS_DOWN, null);
|
|
412
|
-
if (
|
|
412
|
+
if (getShowSoftInputOnFocus()) {
|
|
413
413
|
showSoftKeyboard();
|
|
414
414
|
} else {
|
|
415
415
|
if (isKeyboardOpened) {
|
|
@@ -692,6 +692,20 @@ public class ReactViewGroup extends ViewGroup
|
|
|
692
692
|
return ViewUtil.getUIManagerType(getId()) == UIManagerType.FABRIC;
|
|
693
693
|
}
|
|
694
694
|
|
|
695
|
+
@Override
|
|
696
|
+
public void removeView(View view) {
|
|
697
|
+
onViewRemoved(view);
|
|
698
|
+
recoverFocus(view);
|
|
699
|
+
super.removeView(view);
|
|
700
|
+
}
|
|
701
|
+
|
|
702
|
+
@Override
|
|
703
|
+
public void removeViewAt(int index) {
|
|
704
|
+
onViewRemoved(getChildAt(index));
|
|
705
|
+
recoverFocus(getChildAt(index));
|
|
706
|
+
super.removeViewAt(index);
|
|
707
|
+
}
|
|
708
|
+
|
|
695
709
|
@Override
|
|
696
710
|
public void onViewAdded(View child) {
|
|
697
711
|
UiThreadUtil.assertOnUiThread();
|
|
@@ -855,6 +869,7 @@ public class ReactViewGroup extends ViewGroup
|
|
|
855
869
|
/*package*/ void removeViewWithSubviewClippingEnabled(View view) {
|
|
856
870
|
UiThreadUtil.assertOnUiThread();
|
|
857
871
|
|
|
872
|
+
recoverFocus(view);
|
|
858
873
|
Assertions.assertCondition(mRemoveClippedSubviews);
|
|
859
874
|
Assertions.assertNotNull(mClippingRect);
|
|
860
875
|
View[] childArray = Assertions.assertNotNull(mAllChildren);
|
|
@@ -107,7 +107,7 @@ public open class ReactViewManager : ReactClippingViewManager<ReactViewGroup>()
|
|
|
107
107
|
view.isFocusable = false
|
|
108
108
|
view.descendantFocusability = ViewGroup.FOCUS_BLOCK_DESCENDANTS
|
|
109
109
|
} else {
|
|
110
|
-
view.descendantFocusability = ViewGroup.
|
|
110
|
+
view.descendantFocusability = ViewGroup.FOCUS_AFTER_DESCENDANTS
|
|
111
111
|
}
|
|
112
112
|
}
|
|
113
113
|
|
|
@@ -363,8 +363,7 @@ public open class ReactViewManager : ReactClippingViewManager<ReactViewGroup>()
|
|
|
363
363
|
} else {
|
|
364
364
|
view.setOnClickListener(null)
|
|
365
365
|
view.isClickable = false
|
|
366
|
-
|
|
367
|
-
// accessibility reasons
|
|
366
|
+
view.isFocusable = false
|
|
368
367
|
}
|
|
369
368
|
}
|
|
370
369
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-tvos",
|
|
3
|
-
"version": "0.79.7-
|
|
3
|
+
"version": "0.79.7-1",
|
|
4
4
|
"description": "A framework for building native apps using React",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -147,7 +147,7 @@
|
|
|
147
147
|
"whatwg-fetch": "^3.0.0",
|
|
148
148
|
"ws": "^6.2.3",
|
|
149
149
|
"yargs": "^17.6.2",
|
|
150
|
-
"@react-native-tvos/virtualized-lists": "0.79.7-
|
|
150
|
+
"@react-native-tvos/virtualized-lists": "0.79.7-1"
|
|
151
151
|
},
|
|
152
152
|
"codegenConfig": {
|
|
153
153
|
"libraries": [
|