Skip to content

Spread operator doesn't work with "form" and "list" attributes #3681

@imkremen

Description

@imkremen

Describe the bug
I'll try set list and form with spread operator:

let [type, form, list] = ['text', 'myID', 'listID'];
let props = {type, form, list};

It works in regular case:

<input type={type} form={form} list={list}>

But fails with spread operator:

<input {...props}>

Logs
Firefox: setting getter-only property "form"
Chrome: Cannot assign to read only property 'form' of object '#<HTMLInputElement>'

And if we remove "form" attribute:
Firefox: setting getter-only property "list"
Chrome: Cannot assign to read only property 'list' of object '#<HTMLInputElement>'

To Reproduce
REPL

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions