link: fix meta key propagation for comment posting
@@ -168,6 +168,14 @@ export class LinkDetail extends Component {
}}
placeholder="Leave a comment on this link"
onChange={this.setComment}
+ onKeyDown={e => {
+ if (
+ (e.getModifierState("Control") || e.metaKey) &&
+ e.key === "Enter"
+ ) {
+ this.onClickPost();
+ }
+ }}
onFocus={() => this.setState({ commentFocus: true })}
onBlur={() => this.setState({ commentFocus: false })}
value={this.state.comment}
