-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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
No underline on active link with multiple <md-tab-group> #7274
Comments
If I do a zoom- or zoom+ on the page or if I open the console of chrome, the underline appears again. Is it a kind of focus problem maybe ? PS: I tried with the latest version of Angular and Material, it's the same behavior |
Plunk to help describing it: https://plnkr.co/edit/qyKDATOdTb0msRnYjbbe?p=preview |
@julianobrasil , Thank you to have made the plunk :) At the begin, I didn't read correctly, I believed that you asked to me to do it |
OK, copy the plunk link to the issue body description. |
I'm having a hard time reproducing it from the provided Plunkr. Both the top and bottom levels of tabs are underlined. |
I'm running it on Windows with Chrome 60 as well. |
@crisbeto, my Chrome: Versão 61.0.3163.100 (oficial version) 64 bits |
I just updated to Chrome 61 and I'm still not seeing it. |
I checked it out also in IE11 and Edge. I've changed the screen resolution to 3 different values (1024x768, 1280x1024 and 1920 x 1080) looking for any situation where the problem didn't occur. Unfortunately, I saw the problem in each case. 😞 More info: this is not a new issue. This is a dupe of #5503. Additionally, as mentioned above in #7274 (comment), if you change the browser zoom, the underline appears (the problem seems to be with the initial animation in hidden tabs): @kevincaradant, as a workaround, you can show the inner tab-group just when the tab is selected: <md-tab-group [(selectedIndex)]="index">
<md-tab label="label 2"></md-tab>
<md-tab label="label 3"></md-tab>
<md-tab label="Select Me">
<md-tab-group *ngIf="index === 2">
<md-tab label="Problem">
I'm the content of tab "Problem". Look as how my header is not underlined
</md-tab>
<md-tab label="label 1"></md-tab>
</md-tab-group>
</md-tab>
</md-tab-group> |
I think the root case is the animations being broken inside a tab when it is not initially selected: #5269 |
Duplicate of #6478 |
Any news about this issue ? :) |
PR for fix is in queue, some other PRs need to get merged before it can go in though. |
Hello!! I have the same issue. I'm experiencing this on a MacBook. Soy this issue is not relative to the SO as was suggested. I'd really appreciate if you could fix it. Thank you!! |
A workaround: whenever the outer mat-tab-group changes its selectedIndex to unhide your inner mat-tab-group, call |
Thanks, it will work in chrome, but not in IE11. Any workaround which will work for both browsers?, Thanks in advance. |
@Shreedevi-G-Rao True, IE needs a different method of creating the event. See this SO answer |
I am using @input from parent mat-tab-group to pass the selectedIndex to child component, seems to work well. |
Any update on this? |
please fix that bug for God sake, |
Also having this issue exactly. Wasted too many hours try to fix/work around it. |
You can add the mat-tab-group as ViewChild and call |
@noahch Thanks a lot! You saved me a lot of hours. As others have said, please fix this! |
FYI lazy loading of tabs gets rid of this problem. Example nested tab group in tab 3
|
If anyone needs help reproducing this, I'm happy to do so. Would love to get it fixed. @noahch When are you calling realignInkBar? It only seems to work for me if I call it in ngAfterViewChecked, but I'd rather not do that every time. |
4 years, 4 years, 4 years and still no fix -_- |
realignInkBar call in ngAfterViewInit works fine for me. |
Still no fix? |
My workaround for index mismatch which leads to wrong ink bar etc:
|
Hello @Veargan , Thank you for sharing a work-around. In order for the Angular team to take action on this issue, we would likely need a reproduction. What version of Angular components does this issue happen for you on? And are you able to create a Stackblitz reproduction using a recent (ideally latest) version of Angular? Best regards, Zach |
Bug, feature request, or proposal:
Bug
Plunk: https://plnkr.co/edit/qyKDATOdTb0msRnYjbbe?p=preview (thanks @julianobrasil)
Use multiple
<md-tab>
and<md-tab-group>
imbricated => lost the underline on active<md-tab>
This is an example:
Picture:
What is the expected behavior?
An underline on the active item
What is the current behavior?
No underline for the active tab. See the snippet code mentioned before.
What is the use-case or motivation for changing an existing behavior?
I need to have two
<md-tab> and <md-tab-group>
imbricated for my needsMaybe I don't use them correctly. I let you to say me about it.
Thank you in advance
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
Angular 4.4.3
OS: Windows 7 Pro 64 bits
TS: 2.4.1
Material: 2.0.0-beta.11
Browser: Chrome V60
Is there anything else we should know?
Nothing else
The text was updated successfully, but these errors were encountered: