You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
tags are removed from the template. In this example, the inside a element will not be in the final HTML ...
exportdefaultcomponent$(()=>{constdialogId=useId();constopen=$(()=>{constdialog=document.getElementById(dialogId)asHTMLDialogElement;dialog.showModal();});return(<formpreventdefault:submit><buttontype="button"onClick$={open}aria-controls={dialogId}>
Open Dialog
</button><dialogid={dialogId}><formmethod="dialog"stoppropagation:submit>{/* <-- Not included */}<inputtype="text"/><buttontype="submit"value="ok"formMethod="dialog">
Save
</button></form></dialog></form>);});
I'm aware that tag shouldn't have <form> tags as children, but I think with <dialog> this is a legit use. Also I wouldn't expect the framework to remove it. Moreover without a warning.
Usually this kind of problem can be fixed with createPortal to move the dialog form out of the parent form, but qwik doesn't provide this kind of solution.
The text was updated successfully, but these errors were encountered:
Which component is affected?
Qwik Rollup / Vite plugin
Describe the bug
Nested
tags are removed from the template. In this example, the inside a element will not be in the final HTML ...I'm aware that tag shouldn't have
<form>
tags as children, but I think with<dialog>
this is a legit use. Also I wouldn't expect the framework to remove it. Moreover without a warning.Reproduction
https://stackblitz.com/edit/github-sced1jck?file=src%2Froutes%2Findex.tsx
Steps to reproduce
Create a component with nested tag. Inspect the code in the browser, the nested form has been removed.
System Info
Additional Information
Usually this kind of problem can be fixed with
createPortal
to move the dialog form out of the parent form, but qwik doesn't provide this kind of solution.The text was updated successfully, but these errors were encountered: