Keep copy tooltips closed when a dialog opens 🤫📋
Merged
WO
12d ago+39+39+01234567890123456789-1-1-0123456789
Summary
- Focus the dialog itself on open so the copy button tooltip stays hidden until the button receives focus.
- Add a regression test for the dialog’s initial focus.
Testing
pnpm vitest run: 630 tests passed.pnpm tsc --noEmit: passed.- ESLint and Prettier checks for the changed files: passed.
Summary by cubic
Focuses the dialog container itself on open instead of its first interactive control, so the copy button tooltip no longer appears while the dialog is still animating in.
- Adds an
onOpenAutoFocushandler that skips default autofocus and focuses the dialog element without scrolling. - Adds the
outline-hiddenclass to the dialog content. - Adds a regression test asserting the dialog receives initial focus.