Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tabs: nested tab groups scroll back to the top on every tab change #14065

Closed
RobChangCA opened this issue Nov 9, 2018 · 9 comments
Closed

tabs: nested tab groups scroll back to the top on every tab change #14065

RobChangCA opened this issue Nov 9, 2018 · 9 comments
Assignees
Labels
area: material/tabs P4 A relatively minor issue that is not relevant to core functions

Comments

@RobChangCA
Copy link

RobChangCA commented Nov 9, 2018

Bug, feature request, or proposal:

When clicking on a nested mat-tab that is positioned at the bottom of the page the page jumps to the top requiring the user to scroll back down to see the new tab contents.

What is the expected behavior?

The tab should load its contents without moving the whole page.

What is the current behavior?

When clicking on a nested tab in a page with scroll the page scrolls to the top.

What are the steps to reproduce?

Providing a StackBlitz reproduction is the best way to share your issue.

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

It is a very bad user experience to have to scroll back to the tabs every time you change tabs.

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

Angular/Material 7.0.3
Typescript 3.1.6

Is there anything else we should know?

@josephperrott
Copy link
Member

Can you provide a reproduction in StackBlitz. This will help us to investigate the issue you are seeing.

@josephperrott josephperrott added the needs: clarification The issue does not contain enough information for the team to determine if it is a real bug label Nov 12, 2018
@josephperrott josephperrott self-assigned this Nov 12, 2018
@RobChangCA
Copy link
Author

@RobChangCA
Copy link
Author

Can you provide a reproduction in StackBlitz. This will help us to investigate the issue you are seeing.

If you scroll down and hit a tab the window jumps to the top of the page.
https://angular-wjtrxy-spwkgs.stackblitz.io

This issue is still occurring with material 7.2 and angular 7.1.4 and is preventing me from using this control.

@darrunategui
Copy link

I just tested this with Material 7.2 as well and the bug is still there. It's currently blocking my company from switching over to using Material tabs. There's definitely enough information here to untag it as "needs clarification" and tag it as something that should be fixed soon.

There is another bug here that is also open regarding the same issue and is still looking for a proper fix.

@Arsenalist
Copy link

This is still not fixed in 7.2.1. This is quite a severe bug which is making use Material infeasible.

@Totati
Copy link
Contributor

Totati commented Jul 3, 2019

Hi!
I'm facing this bug too. I've figured it out, that it happens beacuse there is a state when none of the tabs are visible, for that short time there is no scrollbar at all.
I made an example https://stackblitz.com/edit/angular-mat-tab-change-scroll-jump

@josephperrott josephperrott removed their assignment May 28, 2020
@wagnermaciel wagnermaciel added needs triage This issue needs to be triaged by the team and removed needs: clarification The issue does not contain enough information for the team to determine if it is a real bug labels Aug 13, 2020
@crisbeto crisbeto added P4 A relatively minor issue that is not relevant to core functions and removed needs triage This issue needs to be triaged by the team labels Aug 16, 2020
@Splaktar
Copy link
Member

Splaktar commented Jan 10, 2021

From the tabs placement docs:

Caution Avoid nesting a tab within another tab.

@Splaktar Splaktar changed the title Nested Material Tab tabs: nested tab groups scroll back to the top on every tab change Jan 10, 2021
@Splaktar Splaktar self-assigned this Jan 10, 2021
@Splaktar
Copy link
Member

Both of the StackBlitz demos provided here are the same as those provided in #9592. Closing this as a duplicate of that issue.

@angular-automatic-lock-bot
Copy link

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.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Feb 10, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: material/tabs P4 A relatively minor issue that is not relevant to core functions
Projects
None yet
Development

No branches or pull requests

9 participants