Check out this demo showcasing the issue: https://stackblitz.com/edit/stackblitz-starters-tdxfuc?file=src%2Fapp%2Fapp.component.ts
When the content within the mat-dialog-content
becomes too tall, I aim to have control over where the scrollbar will be visible. As shown in the image, it currently scrolls the entire mat-dialog-content
section, but my goal is to have it scroll only inside the contents of the mat-tab
, and not extend beyond the tab group.
https://i.sstatic.net/puwCt2fg.png
The mat-dialog-content
has a defined maximum width of 65vh, which translates to 629.85px in this scenario.
https://i.sstatic.net/pBtoSSGf.png
Despite having a width set at 100%, the mat-tab-group
still overflows its container (mat-dialog-content
) with a width of 1553px, seemingly ignoring the relative height.
https://i.sstatic.net/mLElNnPD.png
I've come across information suggesting that relative height only functions correctly when the parent element has an explicitly set height (here). Is this the root cause of the problem here? And what steps can be taken to address this situation, considering that the proposed solution mentioned in that source (html { height: 100% }
) does not seem to apply in this context?