-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
fix(material/tabs): stop scrolling on tab change #22265
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there an example of the problem that this fixes? I tried applying the changes to our dev app, but I couldn't notice much of a difference. Furthermore, I noticed that the active tab body had a min-height: 1px
so the measurement might be happening at the wrong time.
Also cc @andrewseguin
https://stackblitz.com/edit/mat-tabs-scroll-page-top-on-tab-change?file=app/tabs-template-label-example.html showcases the problem. Steps to repro:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with a couple of non-blocking nits.
@ukrukarg Tests are passing both externally and internally so we should be good to merge this. Do you mind addressing the latest comments? |
Done. |
Hmm, tests failed with some kind of environment problem it looks like (not related to my change), I cannot rerun them, can somebody else rerun? |
Sorry for the delay response @ukrukarg, I must have missed the notification. Can you rebase the PR against the latest master to make sure the CI passes? |
Adds min-height to the mat-tab-group wrapper, so page height is preserved as tabs change, and page doesn't scroll up. Fixes #9592
Adds min-height to the mat-tab-group wrapper, so page height is preserved as tabs change, and page doesn't scroll up. Fixes #9592
Adds min-height to the mat-tab-group wrapper, so page height is preserved as tabs change, and page doesn't scroll up. Fixes #9592
Done. |
* fix(material/tabs): stop scrolling on tab change Adds min-height to the mat-tab-group wrapper, so page height is preserved as tabs change, and page doesn't scroll up. Fixes #9592 * fix(material/tabs): stop scrolling on tab change Adds min-height to the mat-tab-group wrapper, so page height is preserved as tabs change, and page doesn't scroll up. Fixes #9592 * fix(material/tabs): stop scrolling on tab change … Adds min-height to the mat-tab-group wrapper, so page height is preserved as tabs change, and page doesn't scroll up. Fixes #9592 (cherry picked from commit c12f168)
* fix(material/tabs): stop scrolling on tab change Adds min-height to the mat-tab-group wrapper, so page height is preserved as tabs change, and page doesn't scroll up. Fixes #9592 * fix(material/tabs): stop scrolling on tab change Adds min-height to the mat-tab-group wrapper, so page height is preserved as tabs change, and page doesn't scroll up. Fixes #9592 * fix(material/tabs): stop scrolling on tab change … Adds min-height to the mat-tab-group wrapper, so page height is preserved as tabs change, and page doesn't scroll up. Fixes #9592 (cherry picked from commit c12f168)
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Adds min-height to the mat-tab-group wrapper, so page height is preserved
as tabs change, and page doesn't scroll up.
Fixes #9592