This repository was archived by the owner on Sep 5, 2024. It is now read-only.
This repository was archived by the owner on Sep 5, 2024. It is now read-only.
mdTooltip: incorrectly reappears when sidenav closes #7869
Closed
Description
As noted in #3525, when closing, an mdSidenav intentionally refocuses whatever element triggered it to open for accessibility reasons.
However, if there is an mdTooltip on the triggering element, this programmatic refocus of that element causes the tooltip to reappear. This doesn't seem like expected behavior for mdTooltip. Here it is in action:
That's a click on the chat bubble button, then a click outside the sidenav to close it, unexpected tooltip reappears, then another click to make the unexpected tooltip disappear.
This happens in Material v1.1.0-rc2 and v1.0.7 with Angular 1.5.3.
I've reproduced this in Chrome for Mac and IE 11 for Windows.
This happens with or without md-autohide
on the md-tooltip
.
I would suggest one of the following:
- Provide an attribute on
md-tooltip
to opt-out of focus events triggering the tooltip to appear. (Ismd-autohide
supposed to do this? It's not entirely clear from the docs. But it does not solve the problem currently.) - Provide an attribute on
md-sidenav
to opt-out of the autofocus-trigger-elment-on-close behavior. - Change
md-tooltip
so that it magically knows that programmatically-triggered focus events should not cause it to appear. No idea how you'd accomplish that.