angular / angular/components

bug(mat-button): mat-button should be changed to disabled appearance when the parent `<fieldset>` is disabled

Aperta
#31,500 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
P3
Lingua principale
TypeScript
Stelle
25k
Fork
6.8k
Merge medio
1g 8h
PR unite (30g)
91

Descrizione

### 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

The same issue #3033 was closed by angular/angular#35309. But it only fixes form controls not buttons.

The CSS selector for disabled appearance only selects `[disabled]` but it should also select `:disabled` to make the parent `` work.

### Reproduction

StackBlitz link: https://stackblitz.com/edit/components-issue-starter-ck6fmjkd
Steps to reproduce:
1. Put both `mat-button` and **disabled**-`mat-button` in ``.

### Expected Behavior

Both `mat-button` should show the same appearance.

### Actual Behavior

They are different.

### Environment

- Angular: 20.0.6
- CDK/Material: 20.0.5
- Browser(s): Google Chrome
- Operating System (e.g. Windows, macOS, Ubuntu): Windows

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Inizia con gli stili dell’aspetto disabilitato di mat-button e il selettore CSS che attualmente controlla solo [disabled]. Riproduci il problema usando lo StackBlitz collegato con pulsanti all’interno di ; il lavoro è completato quando entrambi i pulsanti hanno lo stesso aspetto disabilitato, incluso il caso del pulsante disabilitato esplicitamente.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
angular, css
Ambito
frontend
Tipo di issue
Bug
Difficoltà
2/5
Tempo stimato
1-3 ore
Stato di attività
Ferma
Chiarezza
Specificata chiaramente
Idoneità per principianti
55/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.