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.

Incorrect positioning when no place is specified

See original GitHub issue

If I don’t specify any place for an element, then desiredPlace defaults to “top”: let desiredPlace = e.currentTarget.getAttribute('data-place') || this.props.place || 'top'

Then getPosition is called like this let result = getPosition(e, e.currentTarget, this.tooltipRef, desiredPlace, desiredPlace, effect, offset) with function being defined as export default function (e, target, node, place, desiredPlace, effect, offset)

Which result in ‘place’ being always equal to ‘desiredPlace’, so let shouldUpdatePlace = desiredPlace !== place is always false and tooltip is shown at ‘top’, although it doesn’t necessarily fit the screen (my case).

That’s true for current npm version 3.11.2. It works fine – the appropriate (visible) place is chosen – in version 3.11.1.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:7
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
alandreicommented, Mar 11, 2020

I think this is an important issue to be fixed. On 4.0.5 this issue is still happening.

2reactions
aronhelsercommented, Feb 14, 2020

That PR was largely contributed by someone who is no longer actively working with React. We would gladly accept a patch or PR…!

Read more comments on GitHub >

github_iconTop Results From Across the Web

position - CSS: Cascading Style Sheets - MDN Web Docs
The position CSS property sets how an element is positioned in a document. The top, right, bottom, and left properties determine the final ......
Read more >
Relatively position an element without it taking up space in ...
The relative positioning on the parent shouldn't usually affect it because it will be positioned at its original position by default if you...
Read more >
Why is my position on the map incorrect or not there?
Troubleshooting in wrong positions of the maps for iOS devices. If the map position is wrong or you're unable to acquire a GPS...
Read more >
AP® Calculus AB/BC 2021 Scoring Guidelines
Answers given as a decimal approximation should be correct to three places after the decimal ... Read with imported incorrect position values from...
Read more >
How to influence the position of float environments like figure ...
One important aspect of the float placement algorithm is that LaTeX never violates the order of placement within a class of floats.
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