Blueprint v5 popover auto placement is different from v4
#5760 opened on Nov 18, 2022
Description
Environment
- Package version(s): @blueprintjs/popover2 v1.10.0
Code Sandbox
Link to a minimal repro: https://sdlqfs.csb.app/
Problem
When configuring Popover2 with rootBoundary="viewport" or rootBoundary="document", the automatic popper.js placement has different behavior compared to Popover. This may be expected and a bugfix in some cases since the positioning engine has improved, but it may be unexpected in other cases.
There may be something we can improve here by setting / unsetting boundary and rootBoundary options on the various modifiers based on user-specified props. For example, I'm not sure that it's "correct" that we set boundary: "clippingParents" (applying the default) when the rootBoundary prop is defined: https://github.com/palantir/blueprint/blob/2460933e7084632f9f8b4f193fcda9fb9b3fd38f/packages/popover2/src/popover2.tsx#L493