Skip to content

Conversation

@chang47
Copy link
Contributor

@chang47 chang47 commented May 8, 2018

Description of changes

For a menu button, alt + down will no longer open the menu. I've changed the code that restricted that behavior to not just split buttons, but to any buttons that haves a menu (split button + menu buttons)

Focus areas to test

I tested behaviors on both Menu Buttons and Split Buttons.

The Split Button behavior remained consistent where alt + down will put focus on the first item in the menu and clicking will put focus on the container

The Menu buttons will open the menu with both alt + down or enter and focus is put on the first item in the list. Clicking will put the focus on the menu container.

@chang47 chang47 requested a review from rebeccaballantyne May 8, 2018 02:16
}

// Note: When enter is pressed, we will let the event continue to propagate
// to trigger the onClick event on the button
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comment seems a little out of place since there is no code under it (I get what you are trying to do here but it feels weird)... consider moving it to a better place

Copy link
Contributor

@jspurlin jspurlin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Potentially move comment, other than this PR looks good

Copy link

@rebeccaballantyne rebeccaballantyne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested, and it looks good! Thanks for making the change.

@chang47 chang47 merged commit be99bf8 into microsoft:master May 8, 2018
Markionium added a commit to Markionium/office-ui-fabric-react that referenced this pull request May 13, 2018
* master: (52 commits)
  Marqueeselection style update (microsoft#4803)
  Applying package updates.
  FocusZone: Add the ability to stop focus from propagating outside the FocusZone (microsoft#4823)
  Unknown persona coin (microsoft#4809)
  Applying package updates.
  BaseButton: Allow Alt + Down on menu buttons to open the menu (microsoft#4807)
  Applying package updates.
  Website: Scroll to top of page on navigation (microsoft#4810)
  Applying package updates.
  ActivityItem: fix getstyles (microsoft#4802)
  Mark Slider#ValuePosition enum as deprecated as it is unused. (microsoft#4799)
  Icon: ensure `styles` still works. (microsoft#4805)
  Popup: Added check for onBlur to prevent focus setting focus to be incorrectly disabled when closing a menu in Chrome (microsoft#4804)
  Update package.json
  Move <Layer> to use React portals when available (microsoft#4724)
  Fix breadcrumb rendering issue when overflow item is at last index  (microsoft#4787)
  Fixes focus issue for contextual menus (microsoft#4744)
  Remove redundant selected items prop on BaseExtendedPicker (microsoft#4769)
  SearchBox: New prop for turning off icon animation (microsoft#4794)
  Add functions to ContextualMenuItem to open and close menus on command (microsoft#4741)
  ...
@microsoft microsoft locked as resolved and limited conversation to collaborators Aug 31, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants