EDIT: I simplified the example to use text inputs. Same error. Form fails to submit when an input is removed from the form. EDIT: Duplicated in Firefox 14. Chrome does not have same behaviour.
I have a multiple file upload form with jquery to add and remove file input elements from the form. If I remove one of the inputs the form.submit() function does not proceed. Below is simplified code using "text" inputs. And a Fiddle at http://jsfiddle.net/carbontax/rMMuE/
<form id="form-foo" method="POST">
<div id="input-container-container">
</div>
</form>
<input type="button" id="add-text-input" value="ADD TEXT INPUT">
<input type="button" id="submit" value="SUBMIT">
Script
$('#submit').click(function() {
$('#form-foo').submit();
});
$("#add-text-input").click(function() {
var div = $('<div/>', {
'class': 'input-container'
}).append($('<button/>', {
'class': 'delete-text-input',
html: "X"
}));
var input = $('<input/>', {
type: 'text',
name: 'texts',
'class': 'input-text'
}).appendTo(div);
div.appendTo($('#input-container-container'));
});
$('#form-foo').on('click', 'button.delete-text-input', function(e) {
e.preventDefault();
$(this).closest('div').remove();
});