From 448347cf9fa404d53d4dbaea585537332eacae54 Mon Sep 17 00:00:00 2001 From: Sumedha Pramod Date: Wed, 14 Nov 2018 17:23:33 -0800 Subject: [PATCH] Fix: Unfocus textarea on comment post/cancel (#286) --- src/components/ActionControls/ActionControls.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/components/ActionControls/ActionControls.js b/src/components/ActionControls/ActionControls.js index a9283d47a..2141c275e 100644 --- a/src/components/ActionControls/ActionControls.js +++ b/src/components/ActionControls/ActionControls.js @@ -64,11 +64,13 @@ class ActionControls extends React.Component { 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 });