https://codepen.io/FezVrasta/pen/QEJGvJ
The popper should be properly positioned.
It's not positioned correctly.
Not an high priority problem, but still nice to have.
I've investigated in the issue and the problem seems related to the element.offsetParent property.
https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/offsetParent
It should return the closest positioned element, but it ignores transformed parents (which act as positioned elements tho).
We should come up with a fix for the getOffsetparent function of Popper.js to detect transformed parents as well.
As temporary workaround, one can add a position different from initial to its transformed parent to make Popper.js work properly.
Demo: https://codepen.io/FezVrasta/pen/oLQWqk
@nadiam84 you may find this issue interesting
ping @hgascoigne as seems related to #57
isParentTransformed property to the Popper instance. Could a quick fix be to use that to change position on the parent to relative if it is not already set to something other than initial?I don't think it would help. We have to detect the closest transformed parent, we don't need to change the positioning of anything. If we knew which element to change we would already know what we need
I'm working on some performance optimization and noticed that getOffsetParent is a very sensible function in Popper.js
Even a little improvement that reduced its execution time from 30ms to 15ms allowed me to avoid jank each update. We must find out a very performance effective solution to keep the execution time at max 20ms 馃槺
Actually it seems to work 馃 Even on v1
Most helpful comment
I've investigated in the issue and the problem seems related to the
element.offsetParentproperty.https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/offsetParent
It should return the closest positioned element, but it ignores transformed parents (which act as positioned elements tho).
We should come up with a fix for the
getOffsetparentfunction of Popper.js to detect transformed parents as well.As temporary workaround, one can add a
positiondifferent frominitialto its transformed parent to make Popper.js work properly.Demo: https://codepen.io/FezVrasta/pen/oLQWqk
@nadiam84 you may find this issue interesting
ping @hgascoigne as seems related to #57