I have encountered a similar problem before, but I haven't found a suitable solution yet.
In my VueJS application, the submit function works perfectly fine on desktop browsers like Chrome and Firefox, but for some reason it refuses to submit on mobile phones (tested with Safari).
The submit method within my component looks like this:
methods: {
async removeBet(item) {
this.bet.id = item
try {
await this.$http.post("/user/deletePendingBet", this.bet);
} catch (err) {
console.log(err)
}
},
}
I invoke the method like this:
<a class="dropdown-item" @click="removeBet(value._id)" href="/newBet">Delete</a>
I suspect that the issue lies in how the method is being called, rather than any problems with the database query.
Since I'm not very experienced in mobile development, I'm wondering if Safari requires forms to be submitted in a specific way. If so, what would be the correct approach to submitting a form using JS frameworks like Vue in such cases?