Modal not hidden
Hi Friends! can you help me? I have a modal that is showing up without being called and i hapens when i style it. Specifically when I display: flex on it. Do you know why this happens? Weird thing, it happens only on that modal but not on the other one that also has flex
https://codepen.io/Ari-Cohelo/pen/WNYoBjR
2 Replies
The default display value for a dialog element without the open attribute is display:none. It is normal for display:flex to make it become visible by overriding the default display:none. Here is a minimal proof:
https://codepen.io/chooking/pen/mdaEMWW
The addModal dialog is hidden properly because it does not have display:flex. That is applied to the form inside the dialog.
Great response! thanks!