tonic-ui icon indicating copy to clipboard operation
tonic-ui copied to clipboard

The tooltip around the button will show again when closing the modal

Open cheton opened this issue 3 years ago • 1 comments

Description

The button will receive focus when closing the modal. It should provide the ability to turn off the onFocus event for the tooltip.

How to reproduce

<Tooltip label="This is a tooltip.">
  <Button onClick={onOpen}>
    Launch modal
  </Button>
</Tooltip>

1. Hover over the button

image

2. Launch the modal

image

3. Close the modal

image

cheton avatar Sep 14 '21 05:09 cheton

Here have a workaround is add finalFocusRef prop into <Modal>.

gckenny avatar Sep 14 '21 06:09 gckenny

@gckenny PR #748 introduces several new props to Drawer, Modal, and Tooltip components, enabling more precise control for the focus behavior.

cheton avatar Apr 28 '23 20:04 cheton