components icon indicating copy to clipboard operation
components copied to clipboard

[Tabs] Scrollbar shows on tab changes

Open Robouste opened this issue 9 years ago • 10 comments

Bug, feature request, or proposal:

BUG

What is the expected behavior?

Have a smooth transition, no matter what's inside my tabs

What is the current behavior?

If the previous tab has a content longer (in height) then the md-list on the next tab, a scrolling bar is showing

What are the steps to reproduce?

PLUNKR Switch from tab 1 to tab 2 to see the scrolling bar

What is the use-case or motivation for changing an existing behavior?

No unwanted effects

Which versions of Angular, Material, OS, TypeScript, browsers are affected?

Material beta.8 Angular 4

Robouste avatar Jul 28 '17 09:07 Robouste

@Robouste What browser are you referring too? Next to that, please add dynamicHeight to your md-tab-group to see if it resolves the issue.

donroyco avatar Jul 28 '17 10:07 donroyco

I noticed this myself the other day. Adding dynamicHeight as suggested by @donroyco solved the issue for me.

grizzm0 avatar Jul 28 '17 12:07 grizzm0

hmm, that's wierd. Without the attribute, the height is dynamic but I see the scrollbar. With the attribute, the height is also dynamic but the scrolling is gone.

Edit : I'm using Chrome & Firefox

Robouste avatar Jul 28 '17 13:07 Robouste

facing the same issue. Adding dynamicHeight prevents scrollbar from appearing, but sadly causes heavy impact on the height transition of my wrapper element.

MA-Maddin avatar Aug 13 '17 17:08 MA-Maddin

Is it possible to have the scroll bar not show up between tab transitions, but still show up when there is overflow?

Edit: Got this working, but would prefer to avoid ::ng-deep if possible:

::ng-deep .mat-tab-body-content {
  overflow: visible !important;
}

vincecampanale avatar Mar 18 '18 02:03 vincecampanale

Adding dynamicHeight does not completely solve the issue for me. The scrollbar still appears on the first tab change, then it stops appearing.

seaBubble avatar Mar 14 '19 10:03 seaBubble

@seaBubble I'm unsing dynamicHeight and I've proably managed to solve this with

.mat-tab-body-content { &.ng-animating { overflow: hidden !important; } }

added to my theme.scss

Hextar avatar May 17 '19 10:05 Hextar

@Hextar I have tried that but I can still the scrollbar, unfortunately. Thanks for the suggestion though. Are there any plans to look into fixing this?

seaBubble avatar Jun 24 '19 01:06 seaBubble

Confirmed that there is no scrollbar during animation in v15: https://stackblitz.com/edit/angular-shzd6r-pwokjj (tested on Chrome w/ MacOS)

mmalerba avatar Dec 02 '22 18:12 mmalerba

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.