primitives icon indicating copy to clipboard operation
primitives copied to clipboard

Dialog component should use HTML dialog

Open Bricklou opened this issue 10 months ago • 1 comments

Bug report

Current Behaviour

The current implementation for the dialog use portal with div to render the dialog. Copie d'écran_20240421_110251

Expected behavior

The dialog component should use the native HTML dialog behaviour to render it. This way, there will be no need to do any kind of very trick to make the z-index property work as expected.

Reproducible example

Suggested solution

The dialog component should use the HTML dialog to render, taking advantage of the #top-layer context provided by the browser to render on top of other elements on the page.

Your environment

Software Name(s) Version
Radix Package(s) @radix-ui/react-dialog ^1.0.5
React n/a ^18.2.0
Browser Edge 123.0.2420.81
Assistive tech
Node n/a 20.12.2
npm/yarn pnpm 8.15.4
Operating System Archlinux 6.8.7-arch1-1

Bricklou avatar Apr 21 '24 09:04 Bricklou

Duplicate of https://github.com/radix-ui/primitives/issues/2830 And also a very bad idea (imo)

See also:

  • https://github.com/radix-ui/primitives/issues/1317#issuecomment-1094877241

Zer0xxxx avatar Jun 12 '24 08:06 Zer0xxxx