1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-11 05:53:42 +00:00

Revert "Feat(tooltip): Add showTooltipOnFocus input to TooltipDirective"

This reverts commit 02f62bc0fd.
This commit is contained in:
Stephon Brown
2026-02-05 10:07:42 -05:00
parent 5931857bc5
commit a89ec81a81
2 changed files with 2 additions and 14 deletions

View File

@@ -112,7 +112,7 @@ const sizes: Record<IconButtonSize, string[]> = {
},
hostDirectives: [
AriaDisableDirective,
{ directive: TooltipDirective, inputs: ["tooltipPosition", "showTooltipOnFocus"] },
{ directive: TooltipDirective, inputs: ["tooltipPosition"] },
],
})
export class BitIconButtonComponent implements ButtonLikeAbstraction, FocusableElement {

View File

@@ -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<boolean>(false);
/**
* Controls whether the tooltip should be shown on focus events.
* @default true
*/
readonly showTooltipOnFocus = input<boolean>(true);
private readonly isVisible = signal(false);
private overlayRef: OverlayRef | undefined;
private showTimeoutId: ReturnType<typeof setTimeout> | 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();
};