goetzrobin / spartan

Cutting-edge tools powering Angular full-stack development.
https://spartan.ng
MIT License
1.09k stars 120 forks source link

Dropdown does not lock page scroll #277

Open malmz opened 2 months ago

malmz commented 2 months ago

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

malek-itani commented 2 months ago

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

goetzrobin commented 2 months ago

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

malek-itani commented 2 months ago

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

goetzrobin commented 2 months ago

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

Here you go

malek-itani commented 2 months ago

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

thank you so much, i appreciate it

goetzrobin commented 1 month ago

Upstream issue has been merged!