Hi
mainButton has a Popover which has some buttons which has tooltip. My code below.
import { Button, Popover, Position, Tooltip, PopoverInteractionKind } from "@blueprintjs/core";
<Popover
position={Position.RIGHT}
interactionKind = {PopoverInteractionKind.HOVER}
content = {
<div style={{padding:4}}>
<Tooltip content="Button 1 Tooltip" position={Position.TOP}>
<Button>Button1</Button>
</Tooltip>
<Tooltip content="Button 2 Tooltip" position={Position.TOP}>
<Button>Button2</Button>
</Tooltip>
<Tooltip content="Button 3 Tooltip" position={Position.TOP}>
<Button>Button3</Button>
</Tooltip>
</div>
}
>
<Button id="mainButton">HOVER ME AND SHOW POPOVER</Button>
</Popover>
But first button's tooltip opening itself immediatelly when popover is opened. Mouse is not over on first button but why opening tooltip?
When hovered over main button, first button in the popover gets focused. So the tooltip is shown. I guess that should be the default behavior.
Setting autofocus={false} will fix it.
https://codesandbox.io/s/blueprintjs-popover-autofocus-ejtl5
When hovered over main button, first button in the popover gets focused. So the tooltip is shown. I guess that should be the default behavior.
Setting
autofocus={false}will fix it.https://codesandbox.io/s/blueprintjs-popover-autofocus-ejtl5
Hi,
Thanks for answer. Yes normally autofocus is solving problem. But in my case this is doesn't working.
Please check below link. I Put 2 buttons and both has popover,
One of them is CLICK_TARGET_ONLY and the other is CLICK
Please Open first popover with CLICK_TARGET and keep it's opened (you wont see any tooltip on buttons. This is good.)
And Please click Second Button and open popover.
And you will see BUTTON A's tooltip which in first popover shows immediatelly
Please check below link
https://53xm9.csb.app/
I can confirm we're also experiencing this exact issue even with autofocus=false being set
Update: For some reason adding openOnTargetFocus={false} to the tooltip prevents this from happening.
Most helpful comment
Update: For some reason adding
openOnTargetFocus={false}to the tooltip prevents this from happening.