イベント プロパティSyntheticKeyboardEvent
以外を登録するための React ハンドラを取得できません。null
コンポーネントをフィドルで分離し、アプリケーションと同じ結果を得ています。誰かが私が間違っていることを見ることができますか?
http://jsfiddle.net/kb3gN/1405/
var Hello = React.createClass({
render: function() {
return (
<div>
<p contentEditable="true"
onKeyDown={this.handleKeyDown}
onKeyUp={this.handleKeyUp}
onKeyPress={this.handleKeyPress}>Foobar</p>
<textarea
onKeyDown={this.handleKeyDown}
onKeyUp={this.handleKeyUp}
onKeyPress={this.handleKeyPress}>
</textarea>
<div>
<input type="text" name="foo"
onKeyDown={this.handleKeyDown}
onKeyUp={this.handleKeyUp}
onKeyPress={this.handleKeyPress} />
</div>
</div>
);
},
handleKeyDown: function(e) {
console.log(e);
},
handleKeyUp: function(e) {
console.log(e);
},
handleKeyPress: function(e) {
console.log(e);
}
});
React.renderComponent(<Hello />, document.body);