Skip to content

Commit c77fd22

Browse files
committed
fix(tooltip): Changed keyboard enter with focus event for tooltip sample. Fixes #15044.
1 parent 328ed48 commit c77fd22

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/material-examples/tooltip-manual/tooltip-manual-example.html

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,23 @@
22
<span> Mouse over to </span>
33
<button mat-button
44
(mouseenter)="tooltip.show()"
5-
(keyup.enter)="tooltip.show()"
5+
(focus)="tooltip.show()"
6+
(focusout)="tooltip.hide()"
67
aria-label="Button that progamatically shows a tooltip on another button"
78
class="example-action-button">
89
show
910
</button>
1011
<button mat-button
1112
(mouseenter)="tooltip.hide()"
12-
(keyup.enter)="tooltip.hide()"
13+
(focus)="tooltip.hide()"
1314
aria-label="Button that progamatically hides a tooltip on another button"
1415
class="example-action-button">
1516
hide
1617
</button>
1718
<button mat-button
1819
(mouseenter)="tooltip.toggle()"
19-
(keyup.enter)="tooltip.toggle()"
20+
(focus)="tooltip.toggle()"
21+
(focusout)="tooltip.hide()"
2022
aria-label="Button that progamatically toggles a tooltip on another button to show/hide"
2123
class="example-action-button">
2224
toggle show/hide

0 commit comments

Comments
 (0)