Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug(MatSelect): MatSelect not allowing page scrolling underneath #29366

Closed
1 task done
Martinspire opened this issue Jul 2, 2024 · 1 comment
Closed
1 task done
Labels
needs triage This issue needs to be triaged by the team

Comments

@Martinspire
Copy link

Martinspire commented Jul 2, 2024

Is this a regression?

  • Yes, this behavior used to work in the previous version

The previous version in which this bug was not present was

No response

Description

I spotted an issue with the current Material Select where you can open a mat-select to show options but when its open, you can no longer scroll the page. Behavior seems similarly broken with some but not all other similar components.

The weird thing is that it doesn't work on the current Material Examples page, but it does work on the stackblitzes connected to them.

I have a similar problem in my own repo, but could not really reproduce it in the stackblitz. I do see that they all have the reposition scrollstrategy and I've tried it with the noop one too but it just doesn't seem to work properly.

I've only recently migrated to 18, but 17 also has the issue present as that is our current production version.

I don't have a workaround yet either. Setting the Scroll Strategy doesn't work and when you remove the pointer-events you can no longer close the dropdown. Behavior seems fine with MatAutocomplete examples, but also broken with MatMenu on examples page. Or at the very least overriding default behavior doesn't seem to work.

Reproduction

Broken: https://material.angular.io/components/select/examples

Stackblitz that works: https://stackblitz.com/edit/dpyucv?file=src%2Fexample%2Fselect-optgroup-example.html

Examples page from similar component that works: https://material.angular.io/components/autocomplete/examples

Other example that is broken: https://material.angular.io/components/menu/examples

Expected Behavior

When dropdown is shown I can still scroll the page below it

Actual Behavior

Scrolling is blocked while the dropdown is open.

Environment

  • Angular: 18.0.3 myself and 18.0.5 from material examples site
  • CDK/Material: 18.0.x
  • Browser(s): Edge, Chrome, Firefox
  • Operating System (e.g. Windows, macOS, Ubuntu): Windows
@Martinspire Martinspire added the needs triage This issue needs to be triaged by the team label Jul 2, 2024
@Martinspire Martinspire changed the title bug(COMPONENT): MatSelect not allowing page scrolling Jul 2, 2024
@Martinspire Martinspire changed the title bug(MatSelect): MatSelect not allowing page scrolling Jul 2, 2024
@crisbeto
Copy link
Member

crisbeto commented Jul 4, 2024

Duplicate of #6927.

@crisbeto crisbeto closed this as completed Jul 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs triage This issue needs to be triaged by the team
2 participants