Skip to content

Commit

Permalink
Merge branch 'master' into users/nirice/fix-style-removal-behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
nicholasrice authored Jun 10, 2020
2 parents 84458f2 + caa6323 commit 8c3ef7e
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { SelectClassNameContract } from "@microsoft/fast-components-class-name-c
import Foundation, { HandledProps } from "@microsoft/fast-components-foundation-react";
import {
classNames,
isHTMLElement,
keyCodeArrowDown,
keyCodeArrowLeft,
keyCodeArrowRight,
Expand Down Expand Up @@ -641,7 +642,9 @@ class Select extends Foundation<SelectHandledProps, SelectUnhandledProps, Select
this.state.isMenuOpen &&
!this.props.multiselectable &&
this.rootElement.current !== null &&
!this.rootElement.current.contains(event.relatedTarget as Element)
(!this.rootElement.current.contains(event.relatedTarget as Element) ||
(isHTMLElement(event.relatedTarget) &&
(event.relatedTarget as HTMLElement).id === this.triggerId))
) {
this.toggleMenu(false);
}
Expand Down

0 comments on commit 8c3ef7e

Please sign in to comment.