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.
@@ -106,10 +106,12 @@ function TVFocusGuideView(
106
106
  });
107
107
 
108
108
  React.useEffect(() => {
109
- if (destinationsProp !== null && destinationsProp !== undefined) {
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
@@ -17,5 +17,5 @@ export const version: $ReadOnly<{
17
17
  major: 0,
18
18
  minor: 79,
19
19
  patch: 7,
20
- prerelease: '0',
20
+ prerelease: '1',
21
21
  };
@@ -24,7 +24,7 @@ NSDictionary* RCTGetReactNativeVersion(void)
24
24
  RCTVersionMajor: @(0),
25
25
  RCTVersionMinor: @(79),
26
26
  RCTVersionPatch: @(7),
27
- RCTVersionPrerelease: @"0",
27
+ RCTVersionPrerelease: @"1",
28
28
  };
29
29
  });
30
30
  return __rnVersion;
@@ -1,4 +1,4 @@
1
- VERSION_NAME=0.79.7-0
1
+ VERSION_NAME=0.79.7-1
2
2
  react.internal.publishingGroup=io.github.react-native-tvos
3
3
 
4
4
  android.useAndroidX=true
@@ -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
- dialogRootViewGroup.removeView(child)
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 (isInTouchMode() && getShowSoftInputOnFocus()) {
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.FOCUS_BEFORE_DESCENDANTS
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
- // Don't set view.setFocusable(false) because we might still want it to be focusable for
367
- // accessibility reasons
366
+ view.isFocusable = false
368
367
  }
369
368
  }
370
369
 
@@ -22,7 +22,7 @@ constexpr struct {
22
22
  int32_t Major = 0;
23
23
  int32_t Minor = 79;
24
24
  int32_t Patch = 7;
25
- std::string_view Prerelease = "0";
25
+ std::string_view Prerelease = "1";
26
26
  } ReactNativeVersion;
27
27
 
28
28
  } // namespace facebook::react
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-tvos",
3
- "version": "0.79.7-0",
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-0"
150
+ "@react-native-tvos/virtualized-lists": "0.79.7-1"
151
151
  },
152
152
  "codegenConfig": {
153
153
  "libraries": [