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 component not positioned to target component correctly (in multiple manager instances)

See original GitHub issue

Steps to reproduce:

  1. Modify the <App /> component in /example/index.jsx
const App = () =>
  <div
    style={{
      padding: 200,
    }}
  >
    <div style={{ marginBottom: 200 }}>
      <MultipleExample />
    </div>
    <div style={{ marginBottom: 200 }}>
      <AnimatedExample />
      <AnimatedExample /> // popper rendered in incorrect position
      <AnimatedExample /> // popper rendered in incorrect position
    </div>
  </div>
ReactDOM.render(<App />, document.getElementById('app'))
  1. Popper rendered in incorrect position, not directly above the <Target /> component (purple box) screenshot

Issue Analytics

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

github_iconTop GitHub Comments

2reactions
FezVrastacommented, Jun 27, 2017

Cool, actually Popper should use the viewport as constraint (or the document…?).

It seems related to https://github.com/FezVrasta/popper.js/issues/302 somehow

0reactions
tohjustincommented, Jun 27, 2017

Just confirmed that the problem was due to the following style:

body {
    height: 100%;
}

The popper ended up in a weird position b/c it was flushed to the boundary of the body element (for the jsFiddle, react-popper example & calendar example)

I guess react-popper & popper.js were working as intended (will double check on this tonight).

@FezVrasta So sorry for the false alarm =( Really appreciate the time you’ve spent following up on this!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Popper component not positioned to target ... - GitHub
The page in localhost:8080 uses a lot of poppers, & all the poppers (starting from the 3rd one) seems to be anchoring to...
Read more >
react-popper incorrect position on mount - Stack Overflow
I have built a custom tree view in React, and each item contains a dropdown which is positioned using Popper.
Read more >
Popper (v2.×)
It will position any UI element that "pops out" from the flow of your document and floats near a target element. The most...
Read more >
0.10.1 - react-popper - npm
This is a useful way to interact with custom components. Just make sure you pass down the refs properly. import { Manager, Target,...
Read more >
National Reading Panel - Teaching Children to Read - NICHD
Jaimee Nusbacher, Meeting Manager ... apparent that the Panel could not respond properly to its ... sure to describe nature and components of...
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