From 4adee108276daee1bb34de243610bc80a0c374f3 Mon Sep 17 00:00:00 2001 From: Alexander Sklar Date: Fri, 29 Jan 2021 01:13:57 -0800 Subject: [PATCH 1/2] App crashes at startup on RS3 because of RS4+ API usage --- vnext/Microsoft.ReactNative/Views/ReactRootControl.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/vnext/Microsoft.ReactNative/Views/ReactRootControl.cpp b/vnext/Microsoft.ReactNative/Views/ReactRootControl.cpp index cb8ec9a1d1c..cb181dd85d4 100644 --- a/vnext/Microsoft.ReactNative/Views/ReactRootControl.cpp +++ b/vnext/Microsoft.ReactNative/Views/ReactRootControl.cpp @@ -418,7 +418,9 @@ void ReactRootControl::AttachBackHandlers(XamlView const &rootView) noexcept { altLeft.Modifiers(winrt::Windows::System::VirtualKeyModifiers::Menu); // Hide keyboard accelerator tooltips - rootElement.KeyboardAcceleratorPlacementMode(xaml::Input::KeyboardAcceleratorPlacementMode::Hidden); + if (react::uwp::IsRS4OrHigher()) { + rootElement.KeyboardAcceleratorPlacementMode(xaml::Input::KeyboardAcceleratorPlacementMode::Hidden); + } } void ReactRootControl::RemoveBackHandlers() noexcept { From 15b551d749333b5756784af73ce29786811bdfda Mon Sep 17 00:00:00 2001 From: Alexander Sklar Date: Fri, 29 Jan 2021 01:14:12 -0800 Subject: [PATCH 2/2] Change files --- ...ative-windows-2f9e933a-0ef8-4ee6-af39-dd343420ccab.json | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 change/react-native-windows-2f9e933a-0ef8-4ee6-af39-dd343420ccab.json diff --git a/change/react-native-windows-2f9e933a-0ef8-4ee6-af39-dd343420ccab.json b/change/react-native-windows-2f9e933a-0ef8-4ee6-af39-dd343420ccab.json new file mode 100644 index 00000000000..22e6147fdc7 --- /dev/null +++ b/change/react-native-windows-2f9e933a-0ef8-4ee6-af39-dd343420ccab.json @@ -0,0 +1,7 @@ +{ + "type": "prerelease", + "comment": "App crashes at startup on RS3 because of RS4+ API usage", + "packageName": "react-native-windows", + "email": "asklar@microsoft.com", + "dependentChangeType": "patch" +}