I found this issue when I attempted to integrate ReacJs and a jQuery widget.
I bind an click event on input element and document like follow:
var Search = React.createClass({
handleClick: function(e) {
e.stopPropagation();
},
render: function() {
return <input onClick={this.handleClick} />
}
});
document.addEventListener('click', function() {
console.log('propagation')
}, false);
And everytime I click the input element, chrome devtool logs 'propagation' message. Should not document element can not receive click event? I'm confused, Did I miss something?