I have the following elements in Vue:
<div class="search-result" v-for="result in search_results" v-on:click="submit(result)">
{{ result.name }}
</div>
This displays a list of search results. On clicking a result, the submit method fires.
But, it doesn't always work.
Any explanation and/or solution?
What the submit method does is not really relevant, I've reduced it to console.log('what is happening') for testing and I am getting the same results above.
The trackpad is possibly sending a touch event instead of click.
To test this, use the DeviceToolbar in the Chrome inspector, and see if emulating mobile usage of the component also fails.
If so, try v-touch.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With