diff --git a/change/react-native-windows-6edc9831-103f-4ab1-ad63-20824f1d2d3e.json b/change/react-native-windows-6edc9831-103f-4ab1-ad63-20824f1d2d3e.json new file mode 100644 index 00000000000..9eba3d9e8df --- /dev/null +++ b/change/react-native-windows-6edc9831-103f-4ab1-ad63-20824f1d2d3e.json @@ -0,0 +1,7 @@ +{ + "type": "prerelease", + "comment": "Fix Focus Outline for Programmatical focus", + "packageName": "react-native-windows", + "email": "66076509+vineethkuttan@users.noreply.github.com", + "dependentChangeType": "patch" +} diff --git a/change/react-native-windows-capture-null-guard-main.json b/change/react-native-windows-capture-null-guard-main.json index dd867f51aa1..66033062c7b 100644 --- a/change/react-native-windows-capture-null-guard-main.json +++ b/change/react-native-windows-capture-null-guard-main.json @@ -1 +1,7 @@ -{"type":"prerelease","dependentChangeType":"patch","email":"collindanielschneide@gmail.com","packageName":"react-native-windows","comment":"Null-check the capturing component view before notifying OnPointerCaptureLost (crash when the capturing component was unmounted)"} +{ + "type": "prerelease", + "dependentChangeType": "patch", + "email": "collindanielschneide@gmail.com", + "packageName": "react-native-windows", + "comment": "Null-check the capturing component view before notifying OnPointerCaptureLost (crash when the capturing component was unmounted)" +} \ No newline at end of file diff --git a/vnext/Microsoft.ReactNative/Fabric/Composition/RootComponentView.cpp b/vnext/Microsoft.ReactNative/Fabric/Composition/RootComponentView.cpp index b2a6b887ee3..3c2f49fa834 100644 --- a/vnext/Microsoft.ReactNative/Fabric/Composition/RootComponentView.cpp +++ b/vnext/Microsoft.ReactNative/Fabric/Composition/RootComponentView.cpp @@ -100,7 +100,7 @@ void RootComponentView::SetFocusedComponent( m_focusedComponent = value; if (focusState == winrt::Microsoft::ReactNative::FocusState::Programmatic) { focusState = - (!m_useKeyboardForProgrammaticFocus || m_focusState == winrt::Microsoft::ReactNative::FocusState::Pointer) + (!m_useKeyboardForProgrammaticFocus || m_focusState != winrt::Microsoft::ReactNative::FocusState::Keyboard) ? winrt::Microsoft::ReactNative::FocusState::Pointer : winrt::Microsoft::ReactNative::FocusState::Keyboard; }