bug(Material 3 > Button): When button is last child element in mat-dialog-content it causes a vertical scrollbar to appear
- Langage dominant
- TypeScript
- Étoiles
- 25k
- Forks
- 6.8k
- Merge moyen
- 1 j 8 h
- PR mergées (30 j)
- 91
Description
### 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
v17 (Material 2)
### Description
When button is last child element in mat-dialog-content it causes a vertical scrollbar to appear.
### Reproduction
StackBlitz [link](https://stackblitz.com/edit/stackblitz-starters-1giu8v?file=src%2Fapp%2Fdialog%2Fdialog.component.html)
Steps to reproduce:
1. Create Angular v18 project + add Angular material v18
2. Create a dialog component
3. In dialog component: Add a mat-button in mat-dialog-content
4. Open dialog

### Expected Behavior
There should be no vertical scrollbar in the dialog
### Actual Behavior
There is a vertical scroll bar in the dialog
### Environment
- Angular: "@angular/core": "18.0.0"
- CDK/Material: "@angular/material": "18.0.0"
- Browser(s): Edge
- Operating System: Windows
Angular CLI: 18.0.0
Node: 22.2.0
Package Manager: npm 10.7.0
OS: win32 x64
Angular: 18.0.0
... animations, cdk, cli, common, compiler, compiler-cli, core
... forms, language-service, material, material-luxon-adapter
... platform-browser, platform-browser-dynamic, platform-server
... router
Package Version
---------------------------------------------------------
@angular-devkit/architect 0.1800.0
@angular-devkit/build-angular 18.0.0
@angular-devkit/core 18.0.0
@angular-devkit/schematics 18.0.0
@schematics/angular 18.0.0
rxjs 7.8.1
typescript 5.4.5
zone.js 0.14.6
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
Commencez par la reproduction StackBlitz liée et vérifiez la barre de défilement dans une boîte de dialogue Angular 18 Material contenant un bouton comme dernier enfant de mat-dialog-content. Suivez les styles de dialog-content et de Material button concernés ; le travail est terminé lorsque la boîte de dialogue reproduite n’a pas de barre de défilement verticale indésirable tout en conservant le défilement attendu pour le contenu qui déborde.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- angular, typescript
- Domaine
- frontend
- Type d'issue
- Bug
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 45/100