Skip to content

FIx double onClick when invoking buttons via keyboard in Windows - #3970

Merged
Ruriko Araki (rurikoaraki) merged 2 commits into
microsoft:mainfrom
sprx97:user/jevercil/FixDoubleOnClickFromKeyboard
Nov 5, 2025
Merged

FIx double onClick when invoking buttons via keyboard in Windows#3970
Ruriko Araki (rurikoaraki) merged 2 commits into
microsoft:mainfrom
sprx97:user/jevercil/FixDoubleOnClickFromKeyboard

Conversation

@sprx97

Copy link
Copy Markdown
Contributor

Currently in Windows platform I'm seeing a bug where invoking a Button via keyboard results in onClick being triggered twice, once from onKeyUp and once from onKeyPressed. This seemed like the appropriate place to make a fix, but let me know if there's a better place.

Platforms Impacted

  • iOS
  • macOS
  • win32 (Office)
  • windows
  • android

Description of changes

Added 'windows' to shoudOnlyFireIfPressed.

Verification

Manually verified that windows Buttons were not firing onClick twice.

Before After
Screenshot or description before this change Screenshot or description with this change

Pull request checklist

This PR has considered (when applicable):

  • Automated Tests
  • Documentation and examples
  • Keyboard Accessibility
  • Voiceover
  • Internationalization and Right-to-left Layouts

Currently in Windows platform I'm seeing a bug where invoking a Button via keyboard results in `onClick` being triggered twice, once from `onKeyUp` and once from `onKeyPressed`. This seemed like the appropriate place to make a fix, but let me know if there's a better place.
@sprx97
Jeremy Vercillo (sprx97) requested a review from a team as a code owner November 4, 2025 22:03
@sprx97

Copy link
Copy Markdown
Contributor Author

@microsoft-github-policy-service agree company="Microsoft"

@acoates-ms

Copy link
Copy Markdown
Contributor

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@rurikoaraki
Ruriko Araki (rurikoaraki) merged commit afdbf84 into microsoft:main Nov 5, 2025
11 checks passed
@sprx97
Jeremy Vercillo (sprx97) deleted the user/jevercil/FixDoubleOnClickFromKeyboard branch November 5, 2025 02:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants