IconButton didn't handle onKeyDown event properly
Bug Report
- Package version(s): (fill this out)
- Browser and OS versions: (fill this out if relevant)
Priorities and help requested (not applicable if asking question):
Are you willing to submit a PR to fix? (Yes, No)
Requested priority: (Blocking, High, Normal, Low)
Products/sites affected: (if applicable)
Describe the issue:
When user tab to select the button, use key "Enter" or "Space" to select it.
Actual behavior:
The onKeyDown event propagates to its parent first, then the onClick callback is invoked.
Expected behavior:
The onClick callback should be invoked first
If applicable, please provide a codepen repro:
Package version(s): (fill this out)
Browser and OS versions: (fill this out if relevant)
@junchen1 please provide additional context by filling out the Issue template to help with triage and debugging, particularly the above fields.
It would also be helpful if you could provide an isolate repro of this behavior in a Codepen as suggested by the Issue template.
Here's a Codepen which renders an IconButton that you may wish to fork, https://codepen.io/kevintcoughlin/pen/mQqWvZ.
This issue has been automatically marked as stale because it has marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment. Thank you for your contributions to Fabric React!