Skip to content

Commit

Permalink
Fix: Unfocus textarea on comment post/cancel (#286)
Browse files Browse the repository at this point in the history
  • Loading branch information
pramodsum committed Nov 15, 2018
1 parent 529bbc0 commit 448347c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/components/ActionControls/ActionControls.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,13 @@ class ActionControls extends React.Component<Props, State> {
onCreate = ({ text }: { text: string }) => {
const { onCreate, type } = this.props;
onCreate(type, text);
this.setState({ isInputOpen: false });
};

onDelete = (event: Event) => {
event.stopPropagation();
event.preventDefault();
this.setState({ isInputOpen: false });

const { onDelete, id } = this.props;
onDelete({ id });
Expand Down

0 comments on commit 448347c

Please sign in to comment.