Chris Brown
Chris Brown

Reputation: 3

form with id attribute and input with form attribute ie11 issue

This only happens in ie11, this works fine in chrome and ie8

I have code programmed like this

<form .... id='mainform'>
<table>...</>
....
<button>....
....
</form>
<input form='mainform' ... >...

The <input> is outside the <form> tags but it works except in ie11

unless i put the <input> before the </form> then it works in ie11

the odd thing is in ie11 when i use developer tools it moves the </form> so the input comes after the </form> except it works, but if i change the code to match what the developer tools says it fails

What am I doing wrong? why wont ie11 have a <form> with an id attribute accept <input> with a form attribute the same as the form id?

Upvotes: 0

Views: 1594

Answers (1)

Dai
Dai

Reputation: 155428

Of note, Internet Explorer up-to-and-including version 11 does not currently support using the form="" attribute on <input /> elements located outside of a <form> element.

As for the F12 issue, that looks like a bug. I'll let the team know.

Disclaimer: I work on Internet Explorer

Update I've made a copy of your jsFiddle with the extra <html> etc elements removed: http://jsfiddle.net/chris123/t4zd3p2b/2/ however I cannot reproduce the "moving </form>" tag bug. Do you have precise reproduction steps?

Upvotes: 1

Related Questions