Popper-core: Body with margin and relative position causes offset placement of popper

Created on 19 Apr 2018  路  5Comments  路  Source: popperjs/popper-core

CodePen demo

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

What is the expected behavior?

Popper is adjacent to target.

What went wrong?

Popper is offset from target.

Any other comments?

Originally reported as https://github.com/atomiks/tippyjs/issues/231#issuecomment-382605125.

# BUG 馃悶 medium Fixed in v2 medium core

Most helpful comment

馃帀 cool, the new positioning algorithm is paying off.

I hope to be able to ship a stable release in the next 2 months if not sooner.

All 5 comments

I found a potential workaround to add another relatively positioned element container; see https://codepen.io/lofty/pen/OZXdmW

Thanks for the workaround. I've tried to adapt it to my use case (briefly: reusing one popper for many targets), but I can't quite get there. Everywhere I move it breaks positioning in a different way!

Here is my (gross) workaround: https://codepen.io/anon/pen/ZqKXxq.

Appears to be fixed in (at least) v2.0.0-next.4.

馃帀 cool, the new positioning algorithm is paying off.

I hope to be able to ship a stable release in the next 2 months if not sooner.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

skitterm picture skitterm  路  5Comments

ConneXNL picture ConneXNL  路  3Comments

gcanabate picture gcanabate  路  3Comments

diondiondion picture diondiondion  路  4Comments

memboc picture memboc  路  3Comments