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 (

@@ -46,7 +56,7 @@ export function RadicalSection({ ))} {hoverPopover.isOpen ? (
diff --git a/app/features/dictionary/SingleFigureDictionaryEntry.tsx b/app/features/dictionary/SingleFigureDictionaryEntry.tsx index 54af8fa1..8245a568 100644 --- a/app/features/dictionary/SingleFigureDictionaryEntry.tsx +++ b/app/features/dictionary/SingleFigureDictionaryEntry.tsx @@ -225,13 +225,16 @@ export function SingleFigureDictionaryEntry({ )} {isUnicodeCharacter ? (
-
- in your browser: {figure.id}{" "} - U+{figure.id.codePointAt(0)?.toString(16).toUpperCase()} -
{" "} - {radicalIndexes?.length ? ( - - ) : null} +
+ + in your browser: {figure.id}{" "} + U+{figure.id.codePointAt(0)?.toString(16).toUpperCase()} + +
+ {radicalIndexes?.length ? ( + + ) : null} +
{figureIsStandaloneCharacter || figure.isPriority ? (