Skip to content

Text inputs are manipulated multiple times (and unnecessarily) in the DOM #5295

@tbroadley

Description

@tbroadley

Steps to reproduce:

I created a JS Bin to reproduce the problem.

http://jsbin.com/qegiwuzara/edit?html,js,console,output

  1. Type Perf.start() into the console (third pane from the left).
  2. Edit the contents of one of the text inputs in the rightmost pane.
  3. Type Perf.stop() and Perf.printDOM() into the console.

This should show that the value attribute of the edited text input was updated three times in the DOM, and the unedited text input was also updated once.

I tested the same code with 0.13.1. According to React.addons.Perf, only the modified input was updated in the DOM, and it was only updated once.

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