diff --git a/packages/popover2/src/popover2.tsx b/packages/popover2/src/popover2.tsx index cf1e5f27ed..7cfa660a97 100644 --- a/packages/popover2/src/popover2.tsx +++ b/packages/popover2/src/popover2.tsx @@ -536,10 +536,6 @@ export class Popover2 extends AbstractPureComponent2, IPopov private handleTargetBlur = (e: React.FocusEvent) => { if (this.props.openOnTargetFocus && this.isHoverInteractionKind()) { - // e.relatedTarget ought to tell us the next element to receive focus, but if the user just - // clicked on an element which is not focusable (either by default or with a tabIndex attribute), - // it won't be set. So, we filter those out here and assume that a click handler somewhere else will - // close the popover if necessary. if (e.relatedTarget != null) { // if the next element to receive focus is within the popover, we'll want to leave the // popover open. @@ -549,6 +545,8 @@ export class Popover2 extends AbstractPureComponent2, IPopov ) { this.handleMouseLeave((e as unknown) as React.MouseEvent); } + } else { + this.handleMouseLeave((e as unknown) as React.MouseEvent); } } this.lostFocusOnSamePage = e.relatedTarget != null;