[bugfix-298] fix focus outside element with tab key

This commit is contained in:
MathieuG-P
2023-08-09 22:46:10 +02:00
parent efd69e4bb3
commit 301d2fdfc4
2 changed files with 2 additions and 0 deletions
@@ -38,6 +38,7 @@ export const LinkButton = motion(
!props.disabled && props.onClick?.();
}}
style={{ pointerEvents: props.disabled ? "none" : "auto" }}
tabIndex={-1}
>
<span className="absolute top-0 left-0 h-full w-full rounded-full brightness-50 opacity-75 dark:opacity-20 dark:filter-none" style={{ backgroundColor: linkedColor }} />
<BsmIcon className="p-1 absolute top-0 left-0 h-full w-full !bg-transparent -rotate-45 brightness-150" icon={props.linked ? "link" : "unlink"} style={{ color: linkedColor }} />
@@ -121,6 +121,7 @@ export function MapsPlaylistsPanel({ version, isActive }: Props) {
e.stopPropagation();
onClickAdd(index);
}}
tabIndex={-1}
>
<span className="absolute top-0 left-0 h-full w-full brightness-50 opacity-75 dark:opacity-20 dark:filter-none" style={{ backgroundColor: "currentcolor" }} />
<motion.div className="h-full p-0.5" variants={variants}>