question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

TooltipDefinition cut off at the border of the window

See original GitHub issue

<TooltipDefinition> that appear close to the windows border (or the border of an parent component) are cut off

Detailed description

<TooltipDefinition>s do not work well on the edges of the window. E.g. when the trigger text/component is right aligned and its width is smaller than 208px the tooltip is cut off. I have also seen cases in which the tooltip is cut-off by the bounds of a parent component, but need to reproduce this in sandbox.

Related to <TooltipDefinition> component

<TooltipDefinition> always seem to be left aligned with the left side of the tirgger component with a constant width, which makes them cut off by the window boundary. One solution would be to right align them with the tigger component. I have an intermediate solution using the right and left style attibutes as shown in the last button of https://codesandbox.io/s/6l2qvkr3rw. Please take a look.

Not sure what exactly the solution would be for the top, maybe move the tooltip automatically to the bottom.

Chrome & firefox

carbon-components@7.2.0

IBM Cloud SQL Query - we would like to release a Carbon 10 version in the days to come. So this is crutial to us

Steps to reproduce the issue

  1. Place the trigger of a <TooltipDefinition> (width < 208px) to the right side of a window or at the top and you will see it

Please create a reduced test case in CodeSandbox https://codesandbox.io/s/6l2qvkr3rw

Additional information

Screenshot 2019-05-07 at 12 46 46 Screenshot 2019-05-08 at 09 51 22 cut-off at component bound (not covered by codesandbox yet): Screenshot 2019-05-08 at 11 27 11

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:18 (18 by maintainers)

github_iconTop GitHub Comments

1reaction
gmoehlercommented, May 14, 2019

@shixiedesign ok perfect - #2663 is exactly what i was looking for. Thanks for pointing out! When can i expect a new carbon-components-react version to be released (last one was from May1)?

1reaction
elizabethsjuddcommented, May 10, 2019

Ah yes! My bad. Thanks.

Read more comments on GitHub >

github_iconTop Results From Across the Web

css - Tooltip cutoff at the edge of the containing element
The tooltip is cut off on the left side. I tried overflow: visible and higher z-index on .word-container [tooltip-def]:after , but none of...
Read more >
Tooltip text get cut off on the left side - HTML & CSS - SitePoint
This is the problem with tool tips and you have to have enough space to the left and the right in order to...
Read more >
Building a simple tooltip component that never goes off screen
The idea is to set the container with position: relative while the dropdown has a position: absolute and we can use a combination...
Read more >
Thinking on ways to solve TOOLTIPS - YouTube
In today's GUI Challenge, @AdamArgyleInk builds a tooltip with a custom element (no web component!), :has(), transforms, and logical ...
Read more >
Bugzilla bug description tooltip is cut off on the right side
Mr. Palmgren, The problem is still there on Mozilla/5.0 (Windows NT 6.1; WOW64; rv:33.0) Gecko/20100101 Firefox/33.0 ID:20140625030206 CSet: a19e0434ea52 If I ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found