diff options
Diffstat (limited to 'animism-align/frontend/views/align/components/annotations/annotation.form.js')
| -rw-r--r-- | animism-align/frontend/views/align/components/annotations/annotation.form.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/animism-align/frontend/views/align/components/annotations/annotation.form.js b/animism-align/frontend/views/align/components/annotations/annotation.form.js index 9432948..b62c36e 100644 --- a/animism-align/frontend/views/align/components/annotations/annotation.form.js +++ b/animism-align/frontend/views/align/components/annotations/annotation.form.js @@ -24,9 +24,13 @@ class AnnotationForm extends Component { this.handleSubmit = this.handleSubmit.bind(this) } handleKeyDown(e) { + if (e.keyCode === 27) { // escape + actions.align.hideAnnotationForm() + return + } + // console.log(e.keyCode) if (!e.metaKey && !e.ctrlKey) return let { start_ts } = this.props.annotation - console.log(e.keyCode) switch (e.keyCode) { case 38: // up e.preventDefault() |
