themes icon indicating copy to clipboard operation
themes copied to clipboard

[Popover] Issue - absolute positioned trigger creates popover with 100dvh min height

Open raphaellaude opened this issue 1 year ago • 6 comments

Took me a while to figure this out! When the popover trigger is absolutely positioned, the min height seems to be inferred as 100dvh. This came up when trying to place a popover on a map (maplibre-gl). I have only tested in that set-up, so I'm not 100% sure the root issue is not that the trigger is absolutely positioned.

Thought I should flag this for others. Love this library, ty all!

raphaellaude avatar Apr 06 '24 18:04 raphaellaude

Do you have a minimal reproduction? Not sure whether I understand what the exact issue is

vladmoroz avatar Apr 06 '24 18:04 vladmoroz

Yep, absolutely. Will add shortly.

raphaellaude avatar Apr 08 '24 17:04 raphaellaude

@raphaellaude Any follow-up on this? I think I might be experiencing the same issue but wasn't sure.

brekkfast avatar Oct 31 '24 20:10 brekkfast

@raphaellaude Any follow-up on this? I think I might be experiencing the same issue but wasn't sure.

Looking back at my old code I think specifying the min-height did the trick: <Popover.Content size="2" width="300px" minHeight="100px">

raphaellaude avatar Oct 31 '24 23:10 raphaellaude

For me I was running into an issue while using Radix + Storybook:

@supports (min-height: 100dvh) {
  .radix-themes:where([data-is-root-theme="true"]) {
    min-height: 100dvh;
  }
}

☝️ This bit of CSS was causing the Storybook stories to be very tall so I had to override them

For your original problem was it tied to an absolutely positioned trigger?

brekkfast avatar Nov 01 '24 03:11 brekkfast

For your original problem was it tied to an absolutely positioned trigger?

yup

raphaellaude avatar Nov 01 '24 13:11 raphaellaude