fluentui icon indicating copy to clipboard operation
fluentui copied to clipboard

IconButton didn't handle onKeyDown event properly

Open junchen1 opened this issue 8 years ago • 2 comments

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:

junchen1 avatar Nov 19 '18 22:11 junchen1

  • 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.

KevinTCoughlin avatar Nov 19 '18 22:11 KevinTCoughlin

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!

msft-github-bot avatar Nov 24 '18 20:11 msft-github-bot