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] Tab focus change not reported initially when tab-key navigating to tabs component #14142

Closed
swftvsn opened this issue Nov 14, 2018 · 2 comments · Fixed by #15094
Closed
Assignees
Labels
area: material/tabs P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent

Comments

@swftvsn
Copy link
Contributor

swftvsn commented Nov 14, 2018

Bug, feature request, or proposal:

Bug

What is the expected behavior?

I get always notified when the tab focus changes.

What is the current behavior?

I can

tabGroup.focusChange.subscribe(test => {
  console.log('Focus changed', test)
})

And I get notified when user uses the arrows to navigate the focus left or right, but I do not get notified initially when the whole component is focused by user using the tab-key to enter it.

What are the steps to reproduce?

Stackblitz here w/ instructions:
https://stackblitz.com/edit/angular-material2-issue-i5xfe7?file=app/app.component.html

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

I need to know when tabs get focus, and I do, the only exception is if the user focuses the first tab by tabbing to it. Note that I'm not interested in the selected tab, but the tab that currently has focus.

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

All

Is there anything else we should know?

Awesome project, keep up the good work!

@swftvsn
Copy link
Contributor Author

swftvsn commented Nov 15, 2018

I also for some reason can't get (focus) or (blur) to work on any tab related component. Is this intentional?

@josephperrott josephperrott self-assigned this Nov 26, 2018
@crisbeto crisbeto self-assigned this Feb 5, 2019
@crisbeto crisbeto added P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent has pr labels Feb 5, 2019
crisbeto added a commit to crisbeto/material2 that referenced this issue Feb 5, 2019
Fixes the `focusChange` output not emitting when the user tabs into a tab header which is different from the previously-focused one.

Fixes angular#14142.
crisbeto added a commit to crisbeto/material2 that referenced this issue Feb 5, 2019
Fixes the `focusChange` output not emitting when the user tabs into a tab header which is different from the previously-focused one.

Fixes angular#14142.
crisbeto added a commit to crisbeto/material2 that referenced this issue May 19, 2019
Fixes the `focusChange` output not emitting when the user tabs into a tab header which is different from the previously-focused one.

Fixes angular#14142.
crisbeto added a commit to crisbeto/material2 that referenced this issue Dec 24, 2019
Fixes the `focusChange` output not emitting when the user tabs into a tab header which is different from the previously-focused one.

Fixes angular#14142.
crisbeto added a commit to crisbeto/material2 that referenced this issue Feb 5, 2020
Fixes the `focusChange` output not emitting when the user tabs into a tab header which is different from the previously-focused one.

Fixes angular#14142.
crisbeto added a commit to crisbeto/material2 that referenced this issue Feb 21, 2020
Fixes the `focusChange` output not emitting when the user tabs into a tab header which is different from the previously-focused one.

Fixes angular#14142.
@josephperrott josephperrott removed their assignment May 28, 2020
annieyw pushed a commit that referenced this issue Feb 9, 2021
…er (#15094)

Fixes the `focusChange` output not emitting when the user tabs into a tab header which is different from the previously-focused one.

Fixes #14142.
annieyw pushed a commit that referenced this issue Feb 9, 2021
…er (#15094)

Fixes the `focusChange` output not emitting when the user tabs into a tab header which is different from the previously-focused one.

Fixes #14142.

(cherry picked from commit ef18b75)
annieyw pushed a commit that referenced this issue Feb 9, 2021
…er (#15094)

Fixes the `focusChange` output not emitting when the user tabs into a tab header which is different from the previously-focused one.

Fixes #14142.

(cherry picked from commit ef18b75)
@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 Mar 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: material/tabs P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants