components icon indicating copy to clipboard operation
components copied to clipboard

[Tooltip] After scroll and switching tabs, the tooltip won't close

Open Howard-Song opened this issue 8 years ago • 2 comments

Bug, feature request, or proposal:

Bug

What is the expected behavior?

after click it will scroll to top and then I move the mouse in blank area matTooltip closed.In this time I switch browser tab and back to my component,matTooltip will be closed.

What is the current behavior?

I create a scrollToTop component,the button use matTooltip for some message,after click it will scroll to top and then I move the mouse in blank area matTooltip closed.in this time I switch browser tab and back to my component,matTooltip show out. [edit:] I found that every show code button has this problem in https://material.angular.io/components/input/examples, click on any view source button move the mouse to other blank area and switch browser tab and back,the view sourcetooTip show out.

What are the steps to reproduce?

https://stackblitz.com/edit/angular-x7jqnq?file=app%2Fapp.component.html

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

close tooltip

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

Angular: 5.0.0, Material: 5.0.2, OS: win10, TypeScript: 2.4.2, Browsers: [email protected]

Is there anything else we should know?

I find this problem since material5.0.0-rc0,and it's 5.0.2 now,the problem still not fix.the same issue #8728

Howard-Song avatar Dec 27 '17 03:12 Howard-Song

The browser is returning focus to your button when you navigate back to the tab. When the button receives focus, it will display the tooltip. Since we cannot determine if the focus is from a tab-return or otherwise, we won't be able to fix this. Technically since the tab is focusing the button, it should display the tooltip.

andrewseguin avatar Jan 23 '18 23:01 andrewseguin

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.