fix(app): Fix plan mode btn keyboard a11y issues (#10330)

This commit is contained in:
Devin Griffin
2026-01-24 06:27:09 -06:00
committed by GitHub
parent 1533c50ac3
commit d5f78a7278
2 changed files with 5 additions and 5 deletions

View File

@@ -36,7 +36,7 @@
background-color: var(--button-secondary-base);
}
&[data-variant="ghost"] {
background-color: transparent;
background-color: var(--surface-raised-base-hover);
}
&[data-variant="primary"] {
background-color: var(--icon-strong-base);

View File

@@ -39,13 +39,13 @@ export function Tooltip(props: TooltipProps) {
onMount(() => {
const childElements = c()
if (childElements instanceof HTMLElement) {
childElements.addEventListener("focus", () => setOpen(true))
childElements.addEventListener("blur", () => setOpen(false))
childElements.addEventListener("focusin", () => setOpen(true))
childElements.addEventListener("focusout", () => setOpen(false))
} else if (Array.isArray(childElements)) {
for (const child of childElements) {
if (child instanceof HTMLElement) {
child.addEventListener("focus", () => setOpen(true))
child.addEventListener("blur", () => setOpen(false))
child.addEventListener("focusin", () => setOpen(true))
child.addEventListener("focusout", () => setOpen(false))
}
}
}