0

Is it possible to use popper.js to constrain a popup only by the viewport? I'm using Angular and my popups are stored as components. However, this means the component will inherit the dimensions of the parent, which sometimes means there's no room at all for the popup to move, leading to the popup expanding the height of the parent to fit itself, resulting in layout shifts.

Atlinx
  • 318
  • 3
  • 10

1 Answers1

0

I realized popper.js is probably not designed for this use case. I've used Angular Material's OverlayCDK to create popups. The way OverlayCDK works is by hosting the popup at the root of the app, thus avoiding the parent expansion problems.

Atlinx
  • 318
  • 3
  • 10