Popper-core: Position issue when scroller is inside another scroller

Created on 21 Apr 2017  路  17Comments  路  Source: popperjs/popper-core

CodePen demo

https://codepen.io/FezVrasta/pen/vmKWXp

Steps to reproduce the problem

  1. simply hover the button => Tooltip appear correctly
  2. scroll on the outer scroller (body one)
  3. Tooltip isn't properly displayed (not at the right position)

What is the expected behavior?

The tooltip should be displayed at the right position (the same when the page is render, when no scroll is made)

What went wrong?

The position calculation is made based on the body scroller and also the tooltip is inserted into the body instead of the inner scroller.
So when I scroll outside, the position become wrong.

# BUG 馃悶 medium high core

Most helpful comment

Is there a possible fix available in the near future?

I'm using https://github.com/atomiks/tippyjs in a Project and it is really awesome and popper.js does also a good Job. But we have some trouble with Elements which are inside a scrollable Container.

Really looking forward.

All 17 comments

Can you please convert the codepen to use only Popper.js and not any 3rd party library?

Here is the example : https://codepen.io/anon/pen/dWXZXR

The interested file is getOffsetRectRelativeToArbitraryNode. We are addressing the scroll offsets of only the first scrollable parent instead of including all the scrollable parents contained in the common offset parent.

Is there a possible fix available in the near future?

I'm using https://github.com/atomiks/tippyjs in a Project and it is really awesome and popper.js does also a good Job. But we have some trouble with Elements which are inside a scrollable Container.

Really looking forward.

You could send a PR to introduce a failing test case in our functional tests to help me fix the bug

@vladferix unfortunately +1 will not make a CI test magically appear 馃槥

Adding a different codepen from #245 for completeness.

https://codepen.io/FezVrasta/pen/XRpQXJ

Added CI test dfb6129160e28cbb4515af7e51be6353c59e7784

Is there any known version of popper.js not affected by this bug?

I don't think so

Why doesn't scrolling example in the landing page exhibit the problem? https://popper.js.org/

Probably because I manually define the boundariesElement

Probably because I manually define the boundariesElement

Could you point the line where that is done?

Sorry, the boundariesElement is automatically set to the example container because .example sets position: relative

Also the popper markup has to placed inside of the relative element. Doesn't work if it is outside.

Is this issue somehow related to #264 and #253?

Nope I don't think so

Was this page helpful?
0 / 5 - 0 ratings

Related issues

tyrw picture tyrw  路  4Comments

skitterm picture skitterm  路  5Comments

Sawtaytoes picture Sawtaytoes  路  5Comments

nainardev picture nainardev  路  3Comments

gcanabate picture gcanabate  路  3Comments