From e879e713b798c85dd000a451ccad78cc6b1e8a08 Mon Sep 17 00:00:00 2001
From: enahum <nahumhbl@gmail.com>
Date: Tue, 13 Sep 2016 13:00:21 -0300
Subject: PLT-4086 Mobile: ENTER creates a new line even with CTRL+ENTER off
 (#4015)

---
 webapp/components/edit_post_modal.jsx | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

(limited to 'webapp/components/edit_post_modal.jsx')

diff --git a/webapp/components/edit_post_modal.jsx b/webapp/components/edit_post_modal.jsx
index 00c8e0f09..24b1b5c3d 100644
--- a/webapp/components/edit_post_modal.jsx
+++ b/webapp/components/edit_post_modal.jsx
@@ -4,6 +4,7 @@
 import $ from 'jquery';
 import ReactDOM from 'react-dom';
 import Client from 'client/web_client.jsx';
+import * as UserAgent from 'utils/user_agent.jsx';
 import * as AsyncClient from 'utils/async_client.jsx';
 import * as GlobalActions from 'actions/global_actions.jsx';
 import Textbox from './textbox.jsx';
@@ -94,7 +95,7 @@ export default class EditPostModal extends React.Component {
     }
 
     handleEditKeyPress(e) {
-        if (!this.state.ctrlSend && e.which === KeyCodes.ENTER && !e.shiftKey && !e.altKey) {
+        if (!UserAgent.isMobileApp() && !this.state.ctrlSend && e.which === KeyCodes.ENTER && !e.shiftKey && !e.altKey) {
             e.preventDefault();
             ReactDOM.findDOMNode(this.refs.editbox).blur();
             this.handleEdit();
-- 
cgit v1.2.3-1-g7c22

