diff --git a/web/app/components/comment/comment.jsx b/web/app/components/comment/comment.jsx index 83608ef0..a5d24de7 100644 --- a/web/app/components/comment/comment.jsx +++ b/web/app/components/comment/comment.jsx @@ -358,6 +358,7 @@ export default class Comment extends Component { diff --git a/web/app/components/input/input.jsx b/web/app/components/input/input.jsx index 439a083e..21b7d308 100644 --- a/web/app/components/input/input.jsx +++ b/web/app/components/input/input.jsx @@ -25,9 +25,15 @@ export default class Input extends Component { } onKeyDown(e) { + // send on cmd+enter / ctrl+enter if (e.keyCode === 13 && (e.metaKey || e.ctrlKey)) { this.send(); } + + // cancel on esc + if (e.keyCode === 27 && this.props.onCancel) { + this.props.onCancel(); + } } autoResize() {