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.

Tooltip positioning problem, when starting offscreen

See original GitHub issue
  • carbon-components
  • carbon-components-react

Detailed description

Using the <Tooltip> component, if the trigger text starts outside of the browser viewpoint and you have to scroll to get to it, then it’s top positioning is incorrect if you toggle the open attribute using another means other than clicking on the component. For example, if you toggle it with Show / Hide buttons similar to how it’s done in the <UncontrolledTooltipExample/> in the storybook.

It should position it immediately next to the triggerText, but it positions it far below it, off the screen.

Firefox 72.0.2 and others

“carbon-components”: “10.9.1”, “carbon-components-react”: “7.9.3”,

Steps to reproduce the issue

  1. Open code sand box
  2. Scroll down to buttons
  3. Click show
  4. scroll down more to see the tooltip https://codesandbox.io/s/dazzling-mountain-98i0z

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
techtenkcommented, Feb 21, 2020

can do

1reaction
techtenkcommented, Feb 21, 2020

Make sure you scroll the browser window first before clicking the “Show” button. If your resolution is large enough that you can still see the Show button and click it without scrolling first, then it will position it correctly. Increase the spacing div height in that case to force you to scroll before clicking

Read more comments on GitHub >

github_iconTop Results From Across the Web

css tooltip goes off screen
On small screen, hovering over some longer tooltips on right column causes tooltip to go off screen. Is there any way to get...
Read more >
Building a simple tooltip component that never goes off ...
Handling off-screen positions. The main issue with tooltips in a world of responsive design is we can never predict where the label will...
Read more >
14967 – Wrong placement of tooltips
I can't reproduce, tooltips are positioned outside the panel. ... I have the same problem, starting with panel size 30px and higher.
Read more >
JumpTo windows is positioned off screen on a High-DPI ...
This happens only without any source window open. After opening a source or XAML file, the position is correct again. After closing all...
Read more >
Keeping "tooltip" div on screen. : r/css
If you hover the .tool-tip , then the .tool-tip-box will show.Problem is, if t's placed to the right of the page ...
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