Propagation in Firefox
HTML
<p>Here is a problem with Firefox. Because there are two input elements within the same label, clicking the second causes the first to be clicked too. How do I stop this behaviour, without changing the DOM?
<br />
<label id="container">
<input type="file" name="myFile[]" />
<input type="file" name="myFile[]" />
</label>
JavaScript
container.addEventListener("click", function(e) {
// e.preventDefault();
e.stopPropagation();
// Wat do?
console.log("sf", e.originalTarget);
console.log(e, this);
});
$('.container input').each(function( index ) {
$( this ).click(function(e) {
e.stopPropagation();
});
});