fix(app): Fix plan mode btn keyboard a11y issues (#10330)
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user