File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed
compiler/phases/2-analyze Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -568,6 +568,17 @@ const validation = {
568
568
}
569
569
}
570
570
571
+ // can't add form to interactive elements because those are also used by the parser
572
+ // to check for the last auto-closing parent.
573
+ if ( node . name === 'form' ) {
574
+ const path = context . path ;
575
+ for ( let parent of path ) {
576
+ if ( parent . type === 'RegularElement' && parent . name === 'form' ) {
577
+ e . node_invalid_placement ( node , `<${ node . name } >` , parent . name ) ;
578
+ }
579
+ }
580
+ }
581
+
571
582
if ( interactive_elements . has ( node . name ) ) {
572
583
const path = context . path ;
573
584
for ( let parent of path ) {
Original file line number Diff line number Diff line change @@ -118,8 +118,7 @@ export const interactive_elements = new Set([
118
118
'iframe' ,
119
119
'embed' ,
120
120
'select' ,
121
- 'textarea' ,
122
- 'form'
121
+ 'textarea'
123
122
] ) ;
124
123
125
124
export const disallowed_paragraph_contents = [
You can’t perform that action at this time.
0 commit comments