Skip to content

e.stopPropagation() seems to not be working as expect. #4335

@luokuning

Description

@luokuning

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions