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(mat-autocomplete): doesn't allow to have an overlay backdrop #30457

Closed
1 task
6apc1k opened this issue Feb 7, 2025 · 2 comments · Fixed by #30631
Closed
1 task

bug(mat-autocomplete): doesn't allow to have an overlay backdrop #30457

6apc1k opened this issue Feb 7, 2025 · 2 comments · Fixed by #30631
Labels
area: material/autocomplete P4 A relatively minor issue that is not relevant to core functions

Comments

@6apc1k
Copy link

6apc1k commented Feb 7, 2025

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

Currently, autocomplete component lacks the ability to display a backdrop overlay, which makes it's behaviour inconsistent with other components that have overlay (mat-select, mat-menu, etc.).

It might be useful to create a transparent backdrop to block the interactions with the background until the panel is closed (especially when using it in combination with mat-chip-grid), and to be able to make its behaviour consistent with other components such as mat-select.

Reproduction

Steps to reproduce:

https://material.angular.io/components/autocomplete/examples

  1. Open panel in mat autocomplete
  2. Hover over other elements on the page
  3. Observe hover events are not being blocked by a backdrop

Expected Behavior

mat-autocomplete offers a configuration option (e.g. hasBackdrop) to enable or disable the backdrop.

Actual Behavior

There's no way to to create an overlay backdrop with mat-autocomlete.

Environment

  • Angular: 19.0.5
  • CDK/Material: 19.0.5
  • Browser(s): Chrome
  • Operating System (e.g. Windows, macOS, Ubuntu): MacOS
@6apc1k 6apc1k added the needs triage This issue needs to be triaged by the team label Feb 7, 2025
@mDjeee
Copy link

mDjeee commented Feb 13, 2025

same issue, fix please!

@crisbeto crisbeto added P4 A relatively minor issue that is not relevant to core functions area: material/autocomplete and removed needs triage This issue needs to be triaged by the team labels Feb 19, 2025
@mistrykaran91
Copy link
Contributor

Hi! Is anybody working on it? Otherwise, I could try to fix it if you don't mind.

mistrykaran91 added a commit to mistrykaran91/components that referenced this issue Mar 14, 2025
Currently when we open the panel, backdrop is not allowed and is not inline with `mat-select`, `mat-menu`, etc. This fix will align autocomplete with those components

Fixes angular#30457
mistrykaran91 added a commit to mistrykaran91/components that referenced this issue Mar 14, 2025
Currently when we open the panel, backdrop is not allowed and is not inline with `mat-select`, `mat-menu`, etc. This fix will align autocomplete with those components

Fixes angular#30457
mistrykaran91 added a commit to mistrykaran91/components that referenced this issue Mar 15, 2025
Currently when we open the panel, backdrop is not allowed and is not inline with `mat-select`, `mat-menu`, etc. This fix will align autocomplete with those components

Fixes angular#30457
mistrykaran91 added a commit to mistrykaran91/components that referenced this issue Mar 15, 2025
Currently when we open the panel, backdrop is not allowed and is not inline with `mat-select`, `mat-menu`, etc. This fix will align autocomplete with those components

Fixes angular#30457
mistrykaran91 added a commit to mistrykaran91/components that referenced this issue Mar 18, 2025
…kdrop` option

Currently when we open the panel, backdrop is not allowed and is not inline with `mat-select`, `mat-menu`, etc. This fix will align autocomplete with those components and give an option to configure it.

Fixes angular#30457
mistrykaran91 added a commit to mistrykaran91/components that referenced this issue Mar 18, 2025
…drop option

Currently when we open the panel, backdrop is not allowed and is not inline with `mat-select`, `mat-menu`, etc. This fix will align autocomplete with those components and give an option to configure it.

Fixes angular#30457
crisbeto pushed a commit to crisbeto/material2 that referenced this issue Mar 26, 2025
…drop option (angular#30631)

Currently when we open the panel, backdrop is not allowed and is not inline with `mat-select`, `mat-menu`, etc. This fix will align autocomplete with those components and give an option to configure it.

Fixes angular#30457
crisbeto added a commit that referenced this issue Mar 26, 2025
* fix(material/select): close panel on detach output event (#30634)

* fix(material/autocomplete): allow overlay backdrop by setting hasBackdrop option (#30631)

Currently when we open the panel, backdrop is not allowed and is not inline with `mat-select`, `mat-menu`, etc. This fix will align autocomplete with those components and give an option to configure it.

Fixes #30457

---------

Co-authored-by: DavidACCarvalho <85346154+DavidACCarvalho@users.noreply.github.com>
Co-authored-by: Karan Mistry <karan.mistry@siemens.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: material/autocomplete P4 A relatively minor issue that is not relevant to core functions
Projects
None yet
4 participants