diff --git a/packages/labs/src/components/popover/popover2.tsx b/packages/labs/src/components/popover/popover2.tsx index 8bbe32913c..d82ee8e3b0 100644 --- a/packages/labs/src/components/popover/popover2.tsx +++ b/packages/labs/src/components/popover/popover2.tsx @@ -264,9 +264,10 @@ export class Popover2 extends AbstractComponent public render() { const { className } = this.props; const { isOpen, disabled, hasBackdrop } = this.state; + const isHoverInteractionKind = this.isHoverInteractionKind(); let targetProps: React.HTMLAttributes; - if (this.isHoverInteractionKind()) { + if (isHoverInteractionKind) { targetProps = { onBlur: this.handleTargetBlur, onFocus: this.handleTargetFocus, @@ -288,8 +289,11 @@ export class Popover2 extends AbstractComponent ); const children = this.understandChildren(); - const targetTabIndex = this.props.openOnTargetFocus && this.isHoverInteractionKind() ? 0 : undefined; + const targetTabIndex = this.props.openOnTargetFocus && isHoverInteractionKind ? 0 : undefined; const target: JSX.Element = React.cloneElement(children.target, { + className: classNames(children.target.props.className, { + [Classes.ACTIVE]: isOpen && !isHoverInteractionKind, + }), // force disable single Tooltip child when popover is open (BLUEPRINT-552) disabled: isOpen && children.target.type === Tooltip2 ? true : children.target.props.disabled, tabIndex: targetTabIndex,