Skip to content

Input elements always rendered with name attribute #7198

Closed
@okonet

Description

@okonet

Do you want to request a feature or report a bug?

This is a bug (I think)

What is the current behavior?

When rendering <input type="..." /> (without name attribute), it will render <input type="..." name /> to the DOM.

2016-07-06 at 09 49

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem via https://jsfiddle.net or similar (template: https://jsfiddle.net/reactjs/69z2wepo/).

Here is the example with the regression using React 15.2.0: https://esnextb.in/?gist=c4923716061ca73e37f7ed476920aa9c

2016-07-06 at 09 49

What is the expected behavior?

No name attribute rendered if it is not provided.

Here is the expected behavior with React 15.1.0: https://esnextb.in/?gist=aee86dfa6eec38aa2bc24b4c25425905

2016-07-06 at 09 54

Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?

Regression: v15.2.0

Good: v15.1.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions