Skip to content

Commit 4c667e6

Browse files
committed
fix(tooltip): dismiss tooltip on esc
1 parent 1a0f1c4 commit 4c667e6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

projects/element-ng/tooltip/si-tooltip.directive.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ import { SiTooltipService, TooltipRef } from './si-tooltip.service';
2727
'(mouseenter)': 'show()',
2828
'(touchstart)': 'hide()',
2929
'(focusout)': 'hide()',
30-
'(mouseleave)': 'hide()'
30+
'(mouseleave)': 'hide()',
31+
'(document:keydown.escape)': 'tooltipRef && hide()'
3132
}
3233
})
3334
export class SiTooltipDirective implements OnDestroy {

0 commit comments

Comments
 (0)