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
1 changed files with 8 additions and 3 deletions

View File

@ -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>