When I try to supply a class attribute to the submit button, an <i>
tag magically appears around the button, it doesn't matter if I use the input helper or jsx , I've event tried this:
div( class_name: "input-field #{col 4}",dangerously_set_inner_HTML: { __html:
'<input type="submit" value="Login" class="waves-effect waves-light btn waves-input-wrapper" />'
}.to_n)
I'm sure it's react because that tag only appears when I add a className, when I tried this with JSX, react messaged me saying that It didn't know what class
was and that maybe I meant className
so when I changed it the tag re-appeared.
Here's the HTML that gets generated:
<i class="waves-effect waves-light btn waves-input-wrapper waves-input-wrapper" style="">
<input type="submit" value="Login" class="waves-button-input">
</i>
EDIT:
Further evidence, doing:
puts '<input type="submit" value="Login" class="waves-effect waves-light btn waves-input-wrapper" />'.to_n
results in
<input type="submit" value="Login" class="waves-effect waves-light btn waves-input-wrapper" />
Also, when trying to make a patch (using jquery to find the element and then change it) I did some puts, I found that the input was being almost correctly added, it was only missing .waves-button-input
.
It's like it starts off how I want it, then during reacts rendering pass it changes it; first by pulling off the first class name, then takes the rest of it and sticks it in a wrapping <i>
tag and then puts the first bit back in the class attribute of the input tag.
I had to add a sleep command so my jquery could find it after it had been fiddled with.
EDIT: I'm using the react-v0.13 branch.