-
-
Notifications
You must be signed in to change notification settings - Fork 335
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[tooltip] must not be cropped by owning overflow viewport #2972
Comments
Tooltip is a css only solution which needs position relative to make sure the tooltip appears next to the related element. |
Yes, but consider any viewport with scroll, like a table. Such viewport needs And as the I belive this must be fixed as the usecase of viewport with scroll and tooltip inside is legit. |
I think, this isn't fixable via CSS only, as we cannot detect (yet) via CSS if an element is actually overflown or wrapped |
After a quick investigation, the only fix i can offer is an additional variation class like "absolute" as always using "absolute" will break lots of cases. I also cannot tell if it would be ok for each inline element like the icon you used in the jsfiddle As i cannot determine a general approach, i can only think of some custom support like [data-tooltip][data-variation~="absolute"] {
position: absolute;
} would support your use case. (i am not yet sure if "absolute" would be a good enough term though <span class="ui icon link " data-tooltip="foo" data-variation="absolute"><i class="ui icon info circle blue"></i></span> |
The "absolute" setting has one drawback: it wont be part of the scrolling container anymore. If you scroll down, the icon gets misplaced (however the tooltip is still working fine :D) Try to scroll down inside the containers |
https://jsfiddle.net/x4fkmc7L/ is the best I managed to fix it but it is not a solution, as it requires different HTML structure and known size of the internal content. I am closing this issue as we should use Fomantic-UI Popup - I agree with #2972 (comment) - which solves this issue by placing the tooltip div outside the wrapping div (the one with |
Bug Report
Repro
https://jsfiddle.net/bjptg85n/
I belive no FUI component must use
position: relative
as it does not play well withoverflow
and it seems there is no way to recover from the cropped viewport then.Screenshot
Version
2.9.3/latest
The text was updated successfully, but these errors were encountered: