diff --git a/change/@fluentui-react-native-button-05775eef-ba52-4258-b089-a2c1351a8382.json b/change/@fluentui-react-native-button-05775eef-ba52-4258-b089-a2c1351a8382.json new file mode 100644 index 0000000000..ca5e02467f --- /dev/null +++ b/change/@fluentui-react-native-button-05775eef-ba52-4258-b089-a2c1351a8382.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "Update shouldOnlyFireIfPressed for Windows platforms", + "packageName": "@fluentui-react-native/button", + "email": "jeremy.vercillo@gmail.com", + "dependentChangeType": "patch" +} diff --git a/packages/components/Button/src/useButton.ts b/packages/components/Button/src/useButton.ts index 26f618a152..5d0d0cdca7 100644 --- a/packages/components/Button/src/useButton.ts +++ b/packages/components/Button/src/useButton.ts @@ -13,7 +13,7 @@ import type { ButtonProps, ButtonInfo } from './Button.types'; // like the button firing after you tab to it white Enter is pressed // and then releasing Enter, or the Menu reopening since it closes // onKeyDown while the Button operates onKeyUp. -const shouldOnlyFireIfPressed = Platform.OS === ('win32' as any); +const shouldOnlyFireIfPressed = Platform.OS === ('win32' as any) || Platform.OS === ('windows' as any); let isProcessingKeyboardInvocation = false; export const useButton = (props: ButtonProps): ButtonInfo => {