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(Autocomplete): does not lock scroll other than to its panel if opened #26048

Closed
1 task
RobinKamps opened this issue Nov 21, 2022 · 3 comments
Closed
1 task
Labels
needs triage This issue needs to be triaged by the team

Comments

@RobinKamps
Copy link

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

This may sound familiar as it is a long known issue - but perhaps with a new suggestion how to fix it.

The autocomplete panel position is bound to body/html scroll events for performance reasons.
However adding cdkScrollable on a parent scrollable div can fix the issue (may result in performance loss/flickering).
But even if the autocomplete is in a scrollable scope the scrolling may lead to bad side effects (z-index, etc.): e.g. the demo for 15.0.0:
image

Since all other components (menu, select etc.) lock the scrolling of the body/underlaying scroll div, when opened - the same user experience for the autocomplete panel would be great.

Reproduction

Steps to reproduce:

  1. https://material.angular.io/components/autocomplete/examples -> open panel and scroll
  2. https://material.angular.io/components/select/examples -> open panel and scroll

Expected Behavior

autocomplete should have a similar scrolling behaviour as other components

Actual Behavior

autocomplete does not prevent scrolling the underlying element

Environment

  • Angular: 15
  • CDK/Material: 15
@AurelienLoyer
Copy link
Contributor

Same issue here, looking for a solution 😢
Dec-02-2022 18-14-32

@amysorto
Copy link
Contributor

Duplicate of #26484

@amysorto amysorto marked this as a duplicate of #26484 May 19, 2023
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Jun 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
needs triage This issue needs to be triaged by the team
Projects
None yet
Development

No branches or pull requests

3 participants