diff options
author | Reed Garmsen <rgarmsen2295@gmail.com> | 2015-09-23 15:12:23 -0700 |
---|---|---|
committer | Reed Garmsen <rgarmsen2295@gmail.com> | 2015-09-23 15:41:26 -0700 |
commit | ef8705ab6b9f11da77d8056e68b9fc2adb2ef496 (patch) | |
tree | e6a5ab1b6c716b0bae00dcee89f5f3509e78fd0c /web/react/components/create_post.jsx | |
parent | 03eece597d491ed9069fc684a03a980d9250844a (diff) | |
download | chat-ef8705ab6b9f11da77d8056e68b9fc2adb2ef496.tar.gz chat-ef8705ab6b9f11da77d8056e68b9fc2adb2ef496.tar.bz2 chat-ef8705ab6b9f11da77d8056e68b9fc2adb2ef496.zip |
Text cursor now focuses on the textbox after performing a drag and drop of some text
Diffstat (limited to 'web/react/components/create_post.jsx')
-rw-r--r-- | web/react/components/create_post.jsx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/web/react/components/create_post.jsx b/web/react/components/create_post.jsx index 554e1ba35..595643027 100644 --- a/web/react/components/create_post.jsx +++ b/web/react/components/create_post.jsx @@ -232,9 +232,9 @@ export default class CreatePost extends React.Component { } } handleTextDrop(text) { - const originalText = this.state.messageText; - this.setState({messageText: originalText + text}); - React.findDOMNode(this.refs.textbox).focus(); + const newText = this.state.messageText + text; + this.handleUserInput(newText); + Utils.setCaretPosition(React.findDOMNode(this.refs.textbox.refs.message), newText.length); } removePreview(id) { let previews = this.state.previews; |