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 appears in the wrong position

See original GitHub issue

Issue description

  • components: tooltip (maybe also others that use popper)
  • reactstrap version #5.0.0
  • import method not sure
  • react version #16.3.0
  • bootstrap version #4.0.0

What is happening?

The tooltip does not appear in the correct position. Some of the css properties does not appear to be set, namely the transform and top/left properties seem to be missing.

What should be happening?

Tooltip should appear in the correct position

Steps to reproduce issue

  1. Create a new app with create-react-app
  2. add bootstrap and reactstrap
  3. Add a tooltip
  4. Tooltip does not appear in correct position

Code

I could for some reason not get it to show the error in the codepen when I tried earlier. Not sure if it’s a version mismatch or something of the sort.

But you can see the error here: https://reactstrap-error-tooltip.firebaseapp.com/

And the git repo is here: https://github.com/Maistho/reactstrap-tooltip-error

I’ve spent way too long trying to find exactly where the issue is, and I’m not sure if the issue is in reactstrap or in popper or in react-popper. I need some help 😢

Issue Analytics

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

github_iconTop GitHub Comments

2reactions
TheSharpieOnecommented, Apr 17, 2018

fixed upstream. If anyone else runs into this, removing node_modules and doing a fresh install should grab a version of Popper.js (within the server range) which doesn’t have this issue

1reaction
miguel-guedescommented, Dec 7, 2018

I’m also seeing a very odd issue here whereby the tooltip’s arrow is correctly positioned but its text element is not; see screenshots below. Bad news is I seem to be running up-to-date packages:

$ npm ls popper.js
ingnosis@0.0.1 /home/miguelg/prj/ingnosis
└─┬ reactstrap@6.5.0
  └─┬ react-popper@0.10.4
    └── popper.js@1.14.4 

screenshot_2018-12-07_16-18-10

What I find odd is the y translation of the toottip’s wrapper element:

screenshot_2018-12-07_16-21-09

Anyone spotted this issue before?


Tooltip

        <Tooltip placement="left" target="btn-document-new" isOpen={this.state.open}>
          Please select a project first
        </Tooltip>

Target:

        <DropdownToggle caret id="btn-document-new" disabled={disabled} color="success">
          <ReactIcon icon={FaPlus} label="Add" />
        </DropdownToggle>

Read more comments on GitHub >

github_iconTop Results From Across the Web

Bootstrap tooltip in wrong position on initial hover, then in ...
I think the problem is occurring because the div that the tooltip is attached to is absolutely positioned. Here is the div tag...
Read more >
Tooltip displayed at wrong position when page is zoomed or ...
Tooltip displayed at wrong position when page is zoomed or scrolled, and reappears after switching back tab.
Read more >
How to: Position a ToolTip - WPF .NET Framework
This example shows how to specify the position of a tooltip on the screen. ... HasDropShadow="false" Opened="whenToolTipOpens" ...
Read more >
Bootstrap tooltip in wrong position on initial hover - CodePen
JS ; 1. //attempts at fixing the tooltip positioning after page load ; 2. $(function(){ ; 3. //suggestion from Eric G, see https://v4-alpha.getbootstrap.com/ ......
Read more >
Why Chart.js's tooltip appears in wrong position when mouse ...
HTML : Why Chart.js's tooltip appears in wrong position when mouse hover?
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