spartan icon indicating copy to clipboard operation
spartan copied to clipboard

Dropdown does not lock page scroll

Open malmz opened this issue 10 months ago • 6 comments

Please provide the environment you discovered this bug in.

Dropdown example on spartan.ng components page

Which area/package is the issue in?

dropdown-menu

Description

When open, the dropdown does not lock scrolling on the page like radix-ui component does

Please provide the exception or error you saw

N/A

Other information

No response

I would be willing to submit a PR to fix this issue

  • [ ] Yes
  • [ ] No

malmz avatar Apr 24 '24 10:04 malmz

also as the menu gets open, trying to inspect Chrome dev tools leads to hiding the menu (using right click)

malek-itani avatar Apr 25 '24 14:04 malek-itani

I opened an issue in the Angular CDK repository. It's a limitation of their code. I lay out some more info here: https://github.com/angular/components/issues/28965

goetzrobin avatar Apr 25 '24 14:04 goetzrobin

Hi @goetzrobin I wondered what methodology or class Angular Material uses to block page scroll as mat-menu or mat-selects gets open, I tried inspecting HTML elements along with CSS props in Chrome dev tools, but unfortunately couldn't find anything helpful

malek-itani avatar Apr 25 '24 14:04 malek-itani

https://github.com/goetzrobin/spartan/assets/35136007/3222400a-6fa8-4ca9-a83e-5a4349003cbe

Here you go

goetzrobin avatar Apr 25 '24 14:04 goetzrobin

Screen.Recording.2024-04-25.at.4.27.35.PM_resized.mp4 Here you go

thank you so much, i appreciate it

malek-itani avatar Apr 25 '24 14:04 malek-itani

Upstream issue has been merged!

goetzrobin avatar May 06 '24 21:05 goetzrobin