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);
|
background-color: var(--button-secondary-base);
|
||||||
}
|
}
|
||||||
&[data-variant="ghost"] {
|
&[data-variant="ghost"] {
|
||||||
background-color: transparent;
|
background-color: var(--surface-raised-base-hover);
|
||||||
}
|
}
|
||||||
&[data-variant="primary"] {
|
&[data-variant="primary"] {
|
||||||
background-color: var(--icon-strong-base);
|
background-color: var(--icon-strong-base);
|
||||||
|
|||||||
@@ -39,13 +39,13 @@ export function Tooltip(props: TooltipProps) {
|
|||||||
onMount(() => {
|
onMount(() => {
|
||||||
const childElements = c()
|
const childElements = c()
|
||||||
if (childElements instanceof HTMLElement) {
|
if (childElements instanceof HTMLElement) {
|
||||||
childElements.addEventListener("focus", () => setOpen(true))
|
childElements.addEventListener("focusin", () => setOpen(true))
|
||||||
childElements.addEventListener("blur", () => setOpen(false))
|
childElements.addEventListener("focusout", () => setOpen(false))
|
||||||
} else if (Array.isArray(childElements)) {
|
} else if (Array.isArray(childElements)) {
|
||||||
for (const child of childElements) {
|
for (const child of childElements) {
|
||||||
if (child instanceof HTMLElement) {
|
if (child instanceof HTMLElement) {
|
||||||
child.addEventListener("focus", () => setOpen(true))
|
child.addEventListener("focusin", () => setOpen(true))
|
||||||
child.addEventListener("blur", () => setOpen(false))
|
child.addEventListener("focusout", () => setOpen(false))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user