Skip to content

Commit

Permalink
Merge branch 'master' into fluid-inputs
Browse files Browse the repository at this point in the history
  • Loading branch information
Alessandra Davila authored Apr 29, 2020
2 parents 0971805 + 548deac commit 13b93d9
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions packages/react/src/components/ComposedModal/ComposedModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,15 +133,17 @@ export default class ComposedModal extends Component {
}

focusButton = focusContainerElement => {
const primaryFocusElement = focusContainerElement.querySelector(
this.props.selectorPrimaryFocus
);
if (primaryFocusElement) {
primaryFocusElement.focus();
return;
}
if (this.button.current) {
this.button.current.focus();
if (focusContainerElement) {
const primaryFocusElement = focusContainerElement.querySelector(
this.props.selectorPrimaryFocus
);
if (primaryFocusElement) {
primaryFocusElement.focus();
return;
}
if (this.button.current) {
this.button.current.focus();
}
}
};

Expand Down

0 comments on commit 13b93d9

Please sign in to comment.