javascript - How can I get draft.js to recognize the escape key? -


i cancel input , clear field in app when user types escape key. tried testing e.which === 27 in keybindingfn, function never invoked when escape key pressed (it invoked fine normal keys, modifier keys, , arrow keys). how can detect escape keypress in draft.js?

editor component has onescape property

<editor       editorstate={this.state.editorstate}       onchange={this.onchange.bind(this)}       onescape={keyevent=>console.log('escape  pressed')}      ref="editor"  />


Comments

Popular posts from this blog

java - unable show chart in xls document using jasper reports -

javascript - How to change image src on success AJAX -

java.lang.RuntimeException: Could not generate dummy secret at sun.security.ssl.RSAClientKeyExchange.<init> -