canvas-kit icon indicating copy to clipboard operation
canvas-kit copied to clipboard

Tooltip scrolls with page

Open bvasisht opened this issue 3 years ago • 1 comments

🐛 Bug Report

After a tooltip appears on a page, the tooltip continues to appear even after the page is scrolled up or down.

To Reproduce

Add Tooltip to any element and try to hover over that element and the tooltip should appear. Then try to scroll.

Expected Behavior

The tooltip should close when target is scrolled off the screen.

Actual Results

The tooltip continues to show up and does even stick to the element.

Browser (if applicable)

Chrome

Link to repl or repo (highly encouraged)

Error Output

Paste the error output here


or

bvasisht avatar May 31 '22 20:05 bvasisht

Been doing some investigating and it looks like we need to update our tooltip to hide when data-popper-reference-hidden on the element. Here's more info on popperjs's website

As far as where this change should go, I'm guessing https://github.com/Workday/canvas-kit/blob/master/modules/react/tooltip/lib/TooltipContainer.tsx might be a good place?

mannycarrera4 avatar Jun 14 '22 22:06 mannycarrera4