Skip to content

[Tabs] Tab focus change not reported initially when tab-key navigating to tabs component #14142

Closed
@swftvsn

Description

@swftvsn

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!

Metadata

Metadata

Assignees

Labels

P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentarea: material/tabs

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions