03:16 | <Domenic> | Hmm, maybe a bug. I think https://html.spec.whatwg.org/multipage/browsing-the-web.html#make-active used to set the associated Document, but doesn't anymore? |
07:06 | <vrafaeli> | I don't know what is going on when you have nested forms https://codesandbox.io/s/nested-forms-9zgg4x?file=/src/App.js:717-722 |
07:08 | <vrafaeli> | Try submitting the inner form and observe what happens. I know that having nested forms is not really according to specs (I don't know why) but something strange happens. I also tried e.stopPropagation() and the same happens. |
08:15 | <Noam Rosenthal> | Hmm, maybe a bug. I think https://html.spec.whatwg.org/multipage/browsing-the-web.html#make-active used to set the associated Document, but doesn't anymore? |
08:37 | <Noam Rosenthal> | vrafaeli: nested forms are not spec-compilant and have all kind of incompatible behavior across browsers. Unexpected behavior sounds like something you should be expecting. |
09:27 | <vrafaeli> | Ok. What is the reason for nested forms not being allowed by the spec? |
12:29 | <Noam Rosenthal> | vrafaeli: I wasn't there but AFAIK it's a very old thing (HTML3?)... like many things in the web platform, trying to change the behavior at this point would make an even bigger mess. The form attribute on input elements provides an alternative that should be sufficient. |
13:58 | <sideshowbarker> | Ok. What is the reason for nested forms not being allowed by the spec? FWIW the HTML checker does catch that and attempt to provide a helpful message:
I also don’t know why nested forms aren’t allowed. But if we can find an explanation and write it up somewhere, I could make the “Nested forms are not allowed” text in that message into a hyperlink to the explanation. And I guess the best place for the explanation would be as a non-normative Note in the HTML spec itself. |
18:57 | <vrafaeli> | sideshowbarker: FWIW the HTML checker does catch that and attempt to provide a helpful message: Yea I noticed that |