We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
This code
/** @jsx React.DOM */ var Button = React.createClass({ render: function() { return ( <button onMouseDown={this.handleMouseDown} onFocus={this.handleFocus} >Test</button> ); }, handleMouseDown: function() { console.log('handle mouse down'); }, handleFocus: function() { console.log('handle focus'); } }); var button = React.renderComponent( <Button />, document.getElementById('content') ); React.addons.TestUtils.Simulate.mouseDown(button.getDOMNode());
outputs
handle mouse down
Expected output (like in real browser):
handle mouse down handle focus
Demo http://jsbin.com/pasovu/4
The text was updated successfully, but these errors were encountered:
It's correct behavior. Sorry for this issue.
Sorry, something went wrong.
Isn't:
React.addons.TestUtils.Simulate.mouseDown(button.getDOMNode()); React.addons.TestUtils.Simulate.focus(button.getDOMNode());
the answer that may help you?
Output:
But if I do preventDefault on the event generated by Simulate, it won't prevent focus.
No branches or pull requests
This code
outputs
Expected output (like in real browser):
Demo http://jsbin.com/pasovu/4
The text was updated successfully, but these errors were encountered: