Skip to content

Guard tooltip positioning after unmount#677

Draft
Federicorao wants to merge 1 commit into
embedpdf:mainfrom
Federicorao:fix/tooltip-position-unmount-race
Draft

Guard tooltip positioning after unmount#677
Federicorao wants to merge 1 commit into
embedpdf:mainfrom
Federicorao:fix/tooltip-position-unmount-race

Conversation

@Federicorao

Copy link
Copy Markdown

Fixes #666.

Summary

  • Guard tooltip reference, floating, and arrow refs before starting Floating UI positioning.
  • Re-check refs after computePosition resolves so unmounted tooltips do not throw while async positioning is settling.
  • Add a patch changeset for @embedpdf/snippet.

Verification

  • pnpm prettier --check viewers/snippet/src/components/ui/tooltip.tsx .changeset/quiet-tooltips-move.md

pnpm --filter @embedpdf/snippet build could not be completed in this handover environment because a fresh clone needed workspace package dist outputs; the broader pnpm build:packages ran very long and surfaced unrelated existing TypeScript diagnostics in other packages.

@vercel

vercel Bot commented Jun 18, 2026

Copy link
Copy Markdown

@Federicorao is attempting to deploy a commit to the OpenBook Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Tooltip: unhandled rejection "TypeError: ... null (reading 'style')" when tooltip unmounts before computePosition resolves

1 participant