Make modal work without HTML <dialog>
#4068
Replies: 2 comments 3 replies
-
Also if you don't prefer Let me know if you have a question. |
Beta Was this translation helpful? Give feedback.
-
You don't need to nest The Alternatively you can use JS About toasts (or anything you want to be visible when modal is open), I already gave you a working example.
https://play.tailwindcss.com/YnpkHamsIy
Yes, because HTML |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
This post discusses the Modal component: https://daisyui.com/components/modal/
Currently, HTML
<dialog>
tag is required to use this component.Native dialog tag has several disadvantages:
cannot use<form>
tagFor example, in my usecase, my app has a voice agent with sub-title at the bottom center of the screen.
The agent shows a confirmation box, which I want to use the Modal component. But it is impossible to bring the sub-title above the modal if used with
<dialog>
.======
Edited: I made mistake on declaring the first disadvantage.
Correction: to close the dialog with a native button, the native button requires wrapped in a
<form method="dialog">
which conflicts with form in the application logic, since form does not allow nesting.Beta Was this translation helpful? Give feedback.
All reactions