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
Describe the bug
When constructing a FormData instance from an HTMLFormElement containing an input that has both an idand a name, the input's value appears twice in the form data.
To Reproduce
describe('FormData',()=>{describe('Constructor',()=>{it('Contains the value of named inputs with ids only once',()=>{constform=document.createElement('form');constinput=document.createElement('input');input.name='inputName';input.id='inputId';input.value='testing';form.appendChild(input);constformData=newwindow.FormData(form);expect(formData.getAll('inputName')).toEqual(['testing']);});});});
Expected behavior
The resulting formData should only have a single value for the inputName key.
Calling formData.getAll('inputName') returns ['testing'].
Current behavior
Calling formData.getAll('inputName') returns ['testing', 'testing'].
Device:
OS: linux (manjaro)
Browser: N/A
Version: 14.10.1
The text was updated successfully, but these errors were encountered:
Describe the bug
When constructing a
FormData
instance from anHTMLFormElement
containing an input that has both anid
and aname
, the input's value appears twice in the form data.To Reproduce
Expected behavior
The resulting
formData
should only have a single value for theinputName
key.Calling
formData.getAll('inputName')
returns['testing']
.Current behavior
Calling
formData.getAll('inputName')
returns['testing', 'testing']
.Device:
The text was updated successfully, but these errors were encountered: