angular / angular/components

bug(Button): Button hover/clickable outside border & missing token

Aperta
#30,573 5 commenti 0 reazioni 0 assegnatari Vedi su GitHub
area: material/button P4
Lingua principale
TypeScript
Stelle
25k
Fork
6.8k
Merge medio
1g 8h
PR unite (30g)
91

Descrizione

### Is this a regression?

- [x] Yes, this behavior used to work in the previous version

### The previous version in which this bug was not present was

_No response_

### Description

When a override is added to a button, the button remains clickable and can be hovered outside the border. I found a token to override this behavior, but I can't get it to work. Additionally, I suggest improving the documentation by specifying the types of values accepted for the token.

```
@include mat.button-overrides((
filled-touch-target-display: none
))
```

https://github.com/user-attachments/assets/11989574-c581-4aff-858b-d77e2368cd3e

Also there is no option to change outline color of outlined button when hovered/focused/pressed, only for disabled state? According to m3 design it should be possible:
https://m3.material.io/components/buttons/specs#4a0c06da-0b2f-47de-a583-97e0ae80b5a5

### Reproduction

StackBlitz link: https://stackblitz.com/edit/q9bg7z8v?file=src%2Fexample%2Fbutton-overview-example-override.scss
Steps to reproduce:
1. Try to move cursor close to the button border

### Expected Behavior

Button should not be clickable or able to hover outside button border

### Actual Behavior

Button is clickable and can be focused outside border

### Environment

- Angular: 19
- CDK/Material: 19.2.1
- Browser(s): Chrome, Firefox
- Operating System (e.g. Windows, macOS, Ubuntu): macOS

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Inizia con la riproduzione StackBlitz in src/example/button-overview-example-override.scss e verifica come mat.button-overrides gestisce filled-touch-target-display. Confronta l'area di hover, focus e clic con il bordo visibile e verifica se i colori di interazione di outlined-button sono configurabili; il lavoro è completato quando l'area di interazione corrisponde al bordo e i valori dei token accettati sono documentati.

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

Valutazione

Stack tecnologico
angular, sass, typescript
Ambito
frontend
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.