diff options
author | Ryan Wang <R-Wang97@users.noreply.github.com> | 2016-08-19 12:52:48 -0400 |
---|---|---|
committer | Christopher Speller <crspeller@gmail.com> | 2016-08-19 12:52:48 -0400 |
commit | efef3e8ee270655dcf91f9cd322e43f64c1a1ff8 (patch) | |
tree | 5566646e16f9ab64a22b71dff72df9d646085f93 /webapp/components/create_comment.jsx | |
parent | 388fefcc4316e5e16b82134802b29c046f0a4950 (diff) | |
download | chat-efef3e8ee270655dcf91f9cd322e43f64c1a1ff8.tar.gz chat-efef3e8ee270655dcf91f9cd322e43f64c1a1ff8.tar.bz2 chat-efef3e8ee270655dcf91f9cd322e43f64c1a1ff8.zip |
Ctrl+Enter sends messages in mobile view (#3833)
Diffstat (limited to 'webapp/components/create_comment.jsx')
-rw-r--r-- | webapp/components/create_comment.jsx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/webapp/components/create_comment.jsx b/webapp/components/create_comment.jsx index 2b4800bf4..0e4a7d7e6 100644 --- a/webapp/components/create_comment.jsx +++ b/webapp/components/create_comment.jsx @@ -15,6 +15,7 @@ import MsgTyping from './msg_typing.jsx'; import FileUpload from './file_upload.jsx'; import FilePreview from './file_preview.jsx'; import * as Utils from 'utils/utils.jsx'; +import * as UserAgent from 'utils/user_agent.jsx'; import * as GlobalActions from 'actions/global_actions.jsx'; import Constants from 'utils/constants.jsx'; @@ -168,7 +169,7 @@ export default class CreateComment extends React.Component { } commentMsgKeyPress(e) { - if (!Utils.isMobile() && ((this.state.ctrlSend && e.ctrlKey) || !this.state.ctrlSend)) { + if (!UserAgent.isMobileApp() && ((this.state.ctrlSend && e.ctrlKey) || !this.state.ctrlSend)) { if (e.which === KeyCodes.ENTER && !e.shiftKey && !e.altKey) { e.preventDefault(); ReactDOM.findDOMNode(this.refs.textbox).blur(); |