From a03b92e252406a8469a9ffe871a6882b3aedb366 Mon Sep 17 00:00:00 2001
From: Roger Braun <rbraun@Bobble.local>
Date: Tue, 5 Dec 2017 12:09:54 +0100
Subject: Post on submit, not on enter.

---
 src/components/chat/chat.vue | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

(limited to 'src/components/chat/chat.vue')

diff --git a/src/components/chat/chat.vue b/src/components/chat/chat.vue
index 9d3ab39c..0c397472 100644
--- a/src/components/chat/chat.vue
+++ b/src/components/chat/chat.vue
@@ -18,7 +18,9 @@
         </div>
       </div>
       <div class="chat-input">
-        <input v-model="currentMessage" type="text" @keyup.enter="submit(currentMessage)">
+        <form @submit.prevent="submit(currentMessage)">
+          <input v-model="currentMessage" type="text" >
+        </form>
       </div>
     </div>
   </div>
@@ -41,9 +43,12 @@
  }
  .chat-input {
      display: flex;
-     input {
+     form {
          flex: auto;
-         margin: 0.5em;
+         input {
+             margin: 0.5em;
+             width: 100%;
+         }
      }
  }
 </style>
-- 
cgit v1.2.3-70-g09d2

