Skip to content
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"changes": [
{
"packageName": "office-ui-fabric-react",
"comment": "BaseButton: Remove unnecessary putting focus on the split button we toggle a menu",
"type": "patch"
}
],
"packageName": "office-ui-fabric-react",
"email": "[email protected]"
}
Original file line number Diff line number Diff line change
Expand Up @@ -446,10 +446,6 @@ export class BaseButton extends BaseComponent<IBaseButtonProps, IBaseButtonState
};

private _onToggleMenu = (shouldFocusOnContainer: boolean): void => {
if (this._splitButtonContainer.current) {
this._splitButtonContainer.current.focus();
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this the right fix? It looks like you added it in March to fix some specific issues: #4222

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Like we talked offline, we're getting rid of this and instead we're using the onFocus capture event to ensure that focus is set to the SplitButton Container instead of us manually putting it there.


const currentMenuProps = this.state.menuProps;
if (this.props.persistMenu) {
currentMenuProps && currentMenuProps.hidden ? this._openMenu(shouldFocusOnContainer) : this._dismissMenu();
Expand Down