mirror of
https://github.com/urbit/shrub.git
synced 2024-12-18 15:55:00 +03:00
Merge pull request #2654 from urbit/mp/ctrl-enter
link, publish: submit comment on ctrl+enter
This commit is contained in:
commit
75922dd017
@ -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}
|
||||
|
@ -116,7 +116,13 @@ export class Comments extends Component {
|
||||
"b--gray2-d mb2 focus-b--black focus-b--white-d white-d bg-gray0-d"}
|
||||
aria-describedby="comment-desc"
|
||||
style={{height: "4rem"}}
|
||||
onChange={this.commentChange}>
|
||||
onChange={this.commentChange}
|
||||
onKeyPress={(e) => {
|
||||
if ((e.getModifierState("Control") || event.getModifierState("Meta"))
|
||||
&& e.key === "Enter") {
|
||||
this.commentSubmit();
|
||||
}
|
||||
}}>
|
||||
</textarea>
|
||||
</div>
|
||||
<button disabled={disableComment}
|
||||
|
Loading…
Reference in New Issue
Block a user