diff --git a/libs/components/src/icon-button/icon-button.component.ts b/libs/components/src/icon-button/icon-button.component.ts index d1a5f14d1cc..3b5e01132a2 100644 --- a/libs/components/src/icon-button/icon-button.component.ts +++ b/libs/components/src/icon-button/icon-button.component.ts @@ -112,7 +112,7 @@ const sizes: Record = { }, hostDirectives: [ AriaDisableDirective, - { directive: TooltipDirective, inputs: ["tooltipPosition", "showTooltipOnFocus"] }, + { directive: TooltipDirective, inputs: ["tooltipPosition"] }, ], }) export class BitIconButtonComponent implements ButtonLikeAbstraction, FocusableElement { diff --git a/libs/components/src/tooltip/tooltip.directive.ts b/libs/components/src/tooltip/tooltip.directive.ts index 0e2610b53ff..419b503c911 100644 --- a/libs/components/src/tooltip/tooltip.directive.ts +++ b/libs/components/src/tooltip/tooltip.directive.ts @@ -28,7 +28,7 @@ export const TOOLTIP_DELAY_MS = 800; host: { "(mouseenter)": "showTooltip()", "(mouseleave)": "hideTooltip()", - "(focus)": "handleFocus()", + "(focus)": "showTooltip()", "(blur)": "hideTooltip()", "[attr.aria-describedby]": "resolvedDescribedByIds()", }, @@ -50,12 +50,6 @@ export class TooltipDirective implements OnInit, OnDestroy { */ readonly addTooltipToDescribedby = input(false); - /** - * Controls whether the tooltip should be shown on focus events. - * @default true - */ - readonly showTooltipOnFocus = input(true); - private readonly isVisible = signal(false); private overlayRef: OverlayRef | undefined; private showTimeoutId: ReturnType | undefined; @@ -127,12 +121,6 @@ export class TooltipDirective implements OnInit, OnDestroy { }, TOOLTIP_DELAY_MS); }; - protected handleFocus = () => { - if (this.showTooltipOnFocus()) { - this.showTooltip(); - } - }; - protected hideTooltip = () => { this.destroyTooltip(); };