summaryrefslogtreecommitdiffstats
path: root/webapp/components/create_comment.jsx
diff options
context:
space:
mode:
authorChristopher Speller <crspeller@gmail.com>2017-01-12 19:59:37 -0500
committerChristopher Speller <crspeller@gmail.com>2017-01-12 19:59:37 -0500
commit8fb66c2b834ee4e0669de173e5ddfebd56c34d58 (patch)
tree9e8e66772d44c4f9010a48c8e0afed70421238b1 /webapp/components/create_comment.jsx
parent4208e42ba9df02b9c4bd7081179922c21206d83d (diff)
parentaafb8be87c79c60df7534b3b69f967c6301b157e (diff)
downloadchat-8fb66c2b834ee4e0669de173e5ddfebd56c34d58.tar.gz
chat-8fb66c2b834ee4e0669de173e5ddfebd56c34d58.tar.bz2
chat-8fb66c2b834ee4e0669de173e5ddfebd56c34d58.zip
Merge branch 'release-3.6'
Diffstat (limited to 'webapp/components/create_comment.jsx')
-rw-r--r--webapp/components/create_comment.jsx9
1 files changed, 5 insertions, 4 deletions
diff --git a/webapp/components/create_comment.jsx b/webapp/components/create_comment.jsx
index 09ec32b6b..0e9d2a41a 100644
--- a/webapp/components/create_comment.jsx
+++ b/webapp/components/create_comment.jsx
@@ -67,9 +67,10 @@ export default class CreateComment extends React.Component {
fileInfos: draft.fileInfos,
submitting: false,
ctrlSend: PreferenceStore.getBool(Constants.Preferences.CATEGORY_ADVANCED_SETTINGS, 'send_on_ctrl_enter'),
- showPostDeletedModal: false,
- lastBlurAt: 0
+ showPostDeletedModal: false
};
+
+ this.lastBlurAt = 0;
}
componentDidMount() {
@@ -145,7 +146,7 @@ export default class CreateComment extends React.Component {
});
const fasterThanHumanWillClick = 150;
- const forceFocus = (Date.now() - this.state.lastBlurAt < fasterThanHumanWillClick);
+ const forceFocus = (Date.now() - this.lastBlurAt < fasterThanHumanWillClick);
this.focusTextbox(forceFocus);
}
@@ -405,7 +406,7 @@ export default class CreateComment extends React.Component {
}
handleBlur() {
- this.setState({lastBlurAt: Date.now()});
+ this.lastBlurAt = Date.now();
}
render() {