diff --git a/app/features/dictionary/AncientCharacterFormSection.tsx b/app/features/dictionary/AncientCharacterFormSection.tsx index 3553f1ba..a6dee74b 100644 --- a/app/features/dictionary/AncientCharacterFormSection.tsx +++ b/app/features/dictionary/AncientCharacterFormSection.tsx @@ -64,10 +64,9 @@ export function AncientCharacterFormSection({ popper.animationClassName, )} ref={popper.setPopperElement} + {...popper.attributes.popper} style={popper.styles.popper} // eslint-disable-next-line jsx-a11y/no-noninteractive-tabindex - tabIndex={0} - {...popper.attributes.popper} >
These ancient "seal script" character
diff --git a/app/features/dictionary/RadicalSection.tsx b/app/features/dictionary/RadicalSection.tsx
index 20a5acdf..ae3c8224 100644
--- a/app/features/dictionary/RadicalSection.tsx
+++ b/app/features/dictionary/RadicalSection.tsx
@@ -5,6 +5,7 @@ import { PopperOptions } from "~/components/usePaddedPopper";
import { useHoverPopper } from "./useHoverPopper";
const popoverOptions: PopperOptions = {
+ placement: "auto",
modifiers: [
{
name: "preventOverflow",
@@ -14,6 +15,14 @@ const popoverOptions: PopperOptions = {
tether: false,
},
},
+ {
+ name: "offset",
+ options: {
+ offset: ({ popper, reference }) => {
+ return [-popper.width / reference.width, -popper.height / 2];
+ },
+ },
+ },
],
};
export function RadicalSection({
@@ -28,6 +37,7 @@ export function RadicalSection({
return (
{" "}
- {radicalIndexes?.length ? (
-