Post on submit, not on enter.

This commit is contained in:
Roger Braun 2017-12-05 12:09:54 +01:00
parent 6ad27959a6
commit a03b92e252

View file

@ -18,7 +18,9 @@
</div> </div>
</div> </div>
<div class="chat-input"> <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> </div>
</div> </div>
@ -41,9 +43,12 @@
} }
.chat-input { .chat-input {
display: flex; display: flex;
input { form {
flex: auto; flex: auto;
input {
margin: 0.5em; margin: 0.5em;
width: 100%;
}
} }
} }
</style> </style>