Skip to content


Subversion checkout URL

You can clone with
Download ZIP


ReactDOMInput should not set a value for submit buttons unnecessarily fails in IE #518

subtleGradient opened this Issue · 7 comments

5 participants

ReactDOMInput should not set a value for submit buttons unnecessarily.

Expected true to be false.

Might not be the easiest first bug, but would be interesting to find out why this is failing. Requires some browser knowledge.


I did a bit of digging... In IE, the presence of type="submit" seems to add an implicit value attribute.

Running the following:

var i = document.createElement("input");
console.log("before: " + i.hasAttribute("value"));
i.type = "submit";
console.log("after: " + i.hasAttribute("value"));

Chrome logs:

before: false
after: false

IE logs

before: false
after: true

So this could be causing the problem.


Interesting… What is the value in this case? Which version of IE? MSDN says the text will default to "Submit Query", so I'm guessing it's that. Maybe we just need to skip this test sometimes?


Quick testing in IE 11 results in the value being "Submit Query".


Sounds like an encapsulation leak. Perhaps the input component should provide some sort of value getter instead of encouraging us to reach in and noodle with its DOM node. cc @sebmarkbage


Seems like a problem with the test rather than the implementation.


Fixed by #1658.

@spicyj spicyj closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.