react-native-windows 0.74.35 → 0.74.36
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/Microsoft.ReactNative/Fabric/ComponentView.cpp +4 -1
- package/Microsoft.ReactNative/Fabric/Composition/ReactNativeIsland.cpp +2 -2
- package/Microsoft.ReactNative/Fabric/Composition/RootComponentView.cpp +5 -2
- package/Microsoft.ReactNative/Fabric/Composition/RootComponentView.h +2 -1
- package/PropertySheets/Generated/PackageVersion.g.props +3 -3
- package/package.json +1 -1
|
@@ -279,7 +279,10 @@ void ComponentView::parent(const winrt::Microsoft::ReactNative::ComponentView &p
|
|
|
279
279
|
m_parent = parent;
|
|
280
280
|
if (!parent) {
|
|
281
281
|
if (oldRootView && oldRootView->GetFocusedComponent() == *this) {
|
|
282
|
-
oldRootView->TrySetFocusedComponent(
|
|
282
|
+
oldRootView->TrySetFocusedComponent(
|
|
283
|
+
oldParent,
|
|
284
|
+
winrt::Microsoft::ReactNative::FocusNavigationDirection::None,
|
|
285
|
+
true /*forceNoSelectionIfCannotMove*/);
|
|
283
286
|
}
|
|
284
287
|
}
|
|
285
288
|
if (parent) {
|
|
@@ -771,7 +771,7 @@ winrt::Windows::Foundation::Size ReactNativeIsland::Measure(
|
|
|
771
771
|
facebook::react::LayoutConstraints constraints;
|
|
772
772
|
ApplyConstraints(layoutConstraints, constraints);
|
|
773
773
|
|
|
774
|
-
if (m_isInitialized && m_rootTag != -1) {
|
|
774
|
+
if (m_isInitialized && m_rootTag != -1 && m_hasRenderedVisual) {
|
|
775
775
|
if (auto fabricuiManager = ::Microsoft::ReactNative::FabricUIManager::FromProperties(
|
|
776
776
|
winrt::Microsoft::ReactNative::ReactPropertyBag(m_context.Properties()))) {
|
|
777
777
|
facebook::react::LayoutContext context;
|
|
@@ -802,7 +802,7 @@ void ReactNativeIsland::Arrange(
|
|
|
802
802
|
facebook::react::LayoutConstraints fbLayoutConstraints;
|
|
803
803
|
ApplyConstraints(layoutConstraints, fbLayoutConstraints);
|
|
804
804
|
|
|
805
|
-
if (m_isInitialized && m_rootTag != -1 && !m_isFragment) {
|
|
805
|
+
if (m_isInitialized && m_rootTag != -1 && !m_isFragment && m_hasRenderedVisual) {
|
|
806
806
|
if (auto fabricuiManager = ::Microsoft::ReactNative::FabricUIManager::FromProperties(
|
|
807
807
|
winrt::Microsoft::ReactNative::ReactPropertyBag(m_context.Properties()))) {
|
|
808
808
|
facebook::react::LayoutContext context;
|
|
@@ -120,7 +120,8 @@ bool RootComponentView::NavigateFocus(const winrt::Microsoft::ReactNative::Focus
|
|
|
120
120
|
|
|
121
121
|
bool RootComponentView::TrySetFocusedComponent(
|
|
122
122
|
const winrt::Microsoft::ReactNative::ComponentView &view,
|
|
123
|
-
winrt::Microsoft::ReactNative::FocusNavigationDirection direction
|
|
123
|
+
winrt::Microsoft::ReactNative::FocusNavigationDirection direction,
|
|
124
|
+
bool forceNoSelectionIfCannotMove /*= false*/) noexcept {
|
|
124
125
|
auto target = view;
|
|
125
126
|
auto selfView = winrt::get_self<winrt::Microsoft::ReactNative::implementation::ComponentView>(target);
|
|
126
127
|
if (selfView && !selfView->focusable()) {
|
|
@@ -128,7 +129,7 @@ bool RootComponentView::TrySetFocusedComponent(
|
|
|
128
129
|
direction == winrt::Microsoft::ReactNative::FocusNavigationDirection::Previous)
|
|
129
130
|
? FocusManager::FindLastFocusableElement(target)
|
|
130
131
|
: FocusManager::FindFirstFocusableElement(target);
|
|
131
|
-
if (!target)
|
|
132
|
+
if (!target && !forceNoSelectionIfCannotMove)
|
|
132
133
|
return false;
|
|
133
134
|
selfView = winrt::get_self<winrt::Microsoft::ReactNative::implementation::ComponentView>(target);
|
|
134
135
|
}
|
|
@@ -154,6 +155,8 @@ bool RootComponentView::TrySetFocusedComponent(
|
|
|
154
155
|
winrt::get_self<winrt::Microsoft::ReactNative::implementation::ComponentView>(losingFocusArgs.NewFocusedComponent())
|
|
155
156
|
->rootComponentView()
|
|
156
157
|
->SetFocusedComponent(gettingFocusArgs.NewFocusedComponent(), direction);
|
|
158
|
+
} else {
|
|
159
|
+
SetFocusedComponent(nullptr, direction);
|
|
157
160
|
}
|
|
158
161
|
|
|
159
162
|
return true;
|
|
@@ -32,7 +32,8 @@ struct RootComponentView : RootComponentViewT<RootComponentView, ViewComponentVi
|
|
|
32
32
|
winrt::Microsoft::ReactNative::FocusNavigationDirection direction) noexcept;
|
|
33
33
|
bool TrySetFocusedComponent(
|
|
34
34
|
const winrt::Microsoft::ReactNative::ComponentView &view,
|
|
35
|
-
winrt::Microsoft::ReactNative::FocusNavigationDirection direction
|
|
35
|
+
winrt::Microsoft::ReactNative::FocusNavigationDirection direction,
|
|
36
|
+
bool forceNoSelectionIfCannotMove = false) noexcept;
|
|
36
37
|
|
|
37
38
|
bool NavigateFocus(const winrt::Microsoft::ReactNative::FocusNavigationRequest &request) noexcept;
|
|
38
39
|
|
|
@@ -10,11 +10,11 @@
|
|
|
10
10
|
-->
|
|
11
11
|
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
12
12
|
<PropertyGroup>
|
|
13
|
-
<ReactNativeWindowsVersion>0.74.
|
|
13
|
+
<ReactNativeWindowsVersion>0.74.36</ReactNativeWindowsVersion>
|
|
14
14
|
<ReactNativeWindowsMajor>0</ReactNativeWindowsMajor>
|
|
15
15
|
<ReactNativeWindowsMinor>74</ReactNativeWindowsMinor>
|
|
16
|
-
<ReactNativeWindowsPatch>
|
|
16
|
+
<ReactNativeWindowsPatch>36</ReactNativeWindowsPatch>
|
|
17
17
|
<ReactNativeWindowsCanary>false</ReactNativeWindowsCanary>
|
|
18
|
-
<ReactNativeWindowsCommitId>
|
|
18
|
+
<ReactNativeWindowsCommitId>a31e698ed4c308d9f1933ef2abed8bbc4c2bbc31</ReactNativeWindowsCommitId>
|
|
19
19
|
</PropertyGroup>
|
|
20
20
|
</Project>
|