I don’t know anything about vue, but this sounds like you have a form element around your input which is submitted each time you push the enter button.
Sound like you have wrapped it in <form> tag and you have <input type="submit"> in this form. In this case it will submit the form on enter click. You need to prevent form submit on form’s submit event
<!--radio select join or create-->
<!--selection determines which button is shown and which instruction are displayed-->
<f7-list-item radio name="Join-Create"
:checked="toJoin"
@change="toJoin = true"
:title="'Join an existing house'"></f7-list-item>
<br><br>
<f7-list-item radio name="Join-Create"
:checked="!toJoin"
@change="toJoin = false"
:title="'Create a new house'"></f7-list-item>
<f7-block>
<!-- only the button changes each calls a different function-->
<f7-input type="text"
placeholder="House name"
:value="formData.houseName"
v-on:input="formData.houseName =$event.target.value"></f7-input>
<f7-input type="text"
placeholder="Street"
:value="formData.street"
v-on:input="formData.street=$event.target.value"></f7-input>
<f7-input type="text"
placeholder="City"
:value="formData.city"
v-on:input="formData.city =$event.target.value"></f7-input>
<f7-input type="text"
placeholder="Country"
:value="formData.country"
v-on:input="formData.country=$event.target.value"></f7-input>
<br>
<f7-button small round fill color="green" v-if="!toJoin && isformFilled">Create a House</f7-button>
<f7-button small round fill
color="gray"
v-if="!toJoin && !isformFilled"
@click="createHouse">Create a House</f7-button>
<f7-button small round fill v-if="toJoin && isformFilled">Join a House</f7-button>
<f7-button small round fill color="gray" v-if="toJoin && !isformFilled">Join a House</f7-button>
</f7-block>
But the solution is to remove form - i had it in f7-list form - after removing it the enter stoped reloading (it’s doing nothing now but keypress or keyup still do not catch event)
I have this issue also and I’ve discovered it is if you have just one input element wrapped in a form. My workaround was to add a 2nd input element and hide it with css.
you are correct. In my case, I found forms with only one input will have this issue. For forms with multiple inputs, it is fine. I fix this with remove the form tag like:
<f7-list form id="thisisaformid">
change it to
<f7-list id="thisisaformid">
And it works well with my previous code. Even the this.$f7.form.convertToData("#thisisaform");
it can work.
but surely if you remove the form tag you lose the changes the browser makes to the soft keyboard to navigate between fields - which was the reason I started wrapping my inputs with a form …