scale icon indicating copy to clipboard operation
scale copied to clipboard

Tooltip placement (Firefox, etc..)

Open tommy-codez opened this issue 2 years ago • 7 comments

Hi there,

I am not sure if this is posted already, but the Tooltip beta component has some issues with placement.

  • there are problems with the tooltip at the edge on a page
  • in firefox the tooltip in modal dialog shows on "weird" places

i put a example on codesandbox here, https://codesandbox.io/s/tooltip-test-0mmvzg

greetings

tommy-codez avatar Apr 11 '22 14:04 tommy-codez

Hey @tommy-codez, thanks for opening this!

there are problems with the tooltip at the edge on a page

I think this can be solved by using the preventOverflow prop on the Tooltip. I forked the sandbox to test it.

in firefox the tooltip in modal dialog shows on "weird" places

this is definitely a weird bug, in Firefox I don't even see the tooltip. We're exploring updating the placement utility we use for this, to use it also in other components like the Flyout Menu. But maybe this is something that can be fixed independently.

acstll avatar Apr 13 '22 13:04 acstll

Hi @tommy-codez the issue with the weird placement in the modal has been fixed in beta.103 and together with the preventOverflow prop it seems to fix the tooltip placement issues https://codesandbox.io/s/tooltip-test-forked-p6u64p?file=/src/SomeComponent.tsx

felix-ico avatar May 04 '22 17:05 felix-ico

Thanks @felix-ico, the placement looks good in chrome and edge. But for me the tooltip still doesnt work in firefox ...

tommy-codez avatar May 06 '22 09:05 tommy-codez

@tommy-codez thank you for the feedback, i can confirm that this issue persists on firefox. I will have another look to fix this with the current implementation.

felix-ico avatar May 06 '22 09:05 felix-ico

Hey all, thanks for the valuable discussion. A rewrite of the tooltip component utilizing floating-ui instead of popperjs has been published (3.0.0-beta.108) and hopefully solves this issue. Feel free to reopen in case something is still not right.

nowseemee avatar Jul 13 '22 18:07 nowseemee

Hi, I tested it with Scale beta 108 and newest firefox Version (102) and the tooltip still doesnt show up correctly.

tommy-codez avatar Jul 22 '22 09:07 tommy-codez

Hi @tommy-codez, thanks for the feedback! I'll take a look.

nowseemee avatar Jul 25 '22 08:07 nowseemee

Hey @tommy-codez @nowseemee, it's been a while but I forked this codesandbox and updated scale to the latest version:

https://codesandbox.io/s/tooltip-test-forked-42ws7y?file=/package.json

and don't see the issue anymore. I'm closing the issue but feel free to reopen if I missed something.

felix-ico avatar Nov 30 '22 14:11 felix-ico

Hi there, I tested it again with current scale version. The problem with tooltips and also flyout menus still exist in modal windows. They appear at "random" places but not where they belong. Any tips ?

tommy-codez avatar Jun 16 '23 10:06 tommy-codez