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.

Popper shows up at the wrong location for a [position:fixed, scrollable] reference element

See original GitHub issue

CodePen demo

https://codepen.io/anon/pen/VBoXgX

Steps to reproduce the problem

  1. Position the ref element so that it is inside of a scrollable, fixed positioned container
  2. Set placement to “top”

What is the expected behavior?

I expect that the popup shows ABOVE the reference element, because I put {placement: "top"}

What went wrong?

Instead, the popup displays right over the reference element instead of the space above it.

Any other comments?

This was originally a bug that I filed with Tippy, but upon further investigation, it is a bug with Popper. You can find the Tippy Issue here: https://github.com/atomiks/tippyjs/issues/228

Note that the codepen linked above does NOT use the Tippy library. It only uses Popper.

Issue Analytics

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

github_iconTop GitHub Comments

6reactions
broydecommented, Feb 27, 2019

@mirraj2 Seems I’ve found the solution. Try

  modifiers: {
    preventOverflow: {
      escapeWithReference: true
    }
  }
1reaction
johnknoopcommented, Apr 4, 2019

@lionpeloux

escapeWithReference for sure does something, but it doesn’t solve the problem for me.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Popper shows up at the wrong location for a [position:fixed ...
Position the ref element so that it is inside of a scrollable, fixed positioned container; Set placement to "top" ...
Read more >
Popper.js wrong initial position of dropdown/tooltip
You are initializing Popper.js when the element is hidden, and then you toggle its visibility to show it, but Popper.js doesn't know that ......
Read more >
FAQ - Popper
Why is my popper in the wrong location (or not visible at all)? ... If your reference element is position: fixed , use...
Read more >
Everything I Know About Positioning Poppers (Tooltips ...
When the scrolling container is scrolled, the reference element will change its location on the screen. However your tooltip is not "aware" ...
Read more >
Tooltips - Bootstrap
Documentation and examples for adding custom Bootstrap tooltips with CSS and JavaScript using CSS3 for animations and data-attributes for local title storage.
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