JSFiddle - React, Tailwind, and code Playground
HTML
<p>Expected behavior is a "click" alert followed by a "submit" alert.</p>
<br />
<form id="working" onsubmit="return false;">
<fieldset>
<legend>Bind (working):</legend>
<input type="textbox" size="35" value="Click the button or press enter here" />
<input type="textbox" value="IE8 workaround for keypress submit behavior" style="visibility: hidden; width: 0" />
<input type="submit" value="Submit" />
</fieldset>
</form>
<br />
<form id="broken" onsubmit="return false;">
<fieldset>
<legend>Live (broken in IE8):</legend>
<input type="textbox" size="35" value="Click the button or press enter here" />
<input type="textbox" value="IE8 workaround for keypress submit behavior" style="visibility: hidden; width: 0" />
<input type="submit" value="Submit" />
</fieldset>
</form>
CSS
fieldset {
border: 1px solid #ccc;
padding: 5px;
}
JavaScript
$(document).ready(function() {
$('#working').bind('submit', function(event) {
alert('submit');
});
$('#working :submit').bind('click', function(event) {
alert('click');
});
$('#broken').live('submit', function(event) {
alert('submit');
});
$('#broken :submit').live('click', function(event) {
alert('click');
});
});