Phew, this one took me half a day to track down and reproduce. The combination of browser (Safari) and options (strategy: 'fixed') may sound familiar, but this issue is different from #1121.
https://codesandbox.io/s/popperjs-safari-bug-reproduction-6olmm
strategy: 'fixed' within an element that has the CSS rule will-change: transformwill-change
will-change, however since strategy: 'fixed' needs positioning values relative to the viewport, the popover appears in the wrong place:
This seems to have been a regression in 2.4.1. The issue doesn't occur in 2.4.0.
It's more Safari problem than Popper.
Safari does not create containing block for elements that have will-change: transform property. On Safari You also need to set transform: translate(0); then it will work.
In older version of popper there was a bug with incorrect detection of containing block, since it was fixed and according to https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block the problem is with Safari.
It's more Safari problem than Popper.
Fair enough, figuring out the containing block seems to be a tricky problem.
It would be a good idea to add a note about this to the Browser Support section on the website, I'll see if I can make some time to make a PR for this.
Wondering if we could do some feature detection to make it work out of the box?
@FezVrasta we all know that containing block detection is broken, and it works differently in every browser. Maybe we should make it possible in such special cases to pass over the element according to which the popper should calculate. Maybe even as experimental.
you can also try to use the way the mezr does it. But it can kill the performance.
Most helpful comment
@FezVrasta we all know that containing block detection is broken, and it works differently in every browser. Maybe we should make it possible in such special cases to pass over the element according to which the popper should calculate. Maybe even as experimental.
you can also try to use the way the mezr does it. But it can kill the performance.