mirror of
https://github.com/urbit/shrub.git
synced 2024-12-19 08:32:39 +03:00
links: submit comment on ctrl+enter
This commit is contained in:
parent
7a796549bd
commit
8bafdea10c
@ -130,6 +130,12 @@ export class LinkDetail extends Component {
|
||||
}}
|
||||
placeholder="Leave a comment on this link"
|
||||
onChange={this.setComment}
|
||||
onKeyPress={(e) => {
|
||||
if ((e.getModifierState("Control") || event.getModifierState("Meta"))
|
||||
&& e.key === "Enter") {
|
||||
this.onClickPost();
|
||||
}
|
||||
}}
|
||||
onFocus={() => this.setState({commentFocus: true})}
|
||||
onBlur={() => this.setState({commentFocus: false})}
|
||||
value={this.state.comment}
|
||||
|
Loading…
Reference in New Issue
Block a user