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

javascript - Slick Slider width recalculation -

jsf - PrimeFaces Datatable - What is f:facet actually doing? -

angular2 services - Angular 2 RC 4 Http post not firing -