Skip to content

Conversation

@kmturley
Copy link

If you hit enter/return on mobile or desktop, the entire page is reloaded, instead of running the search query. This PR fixes that.

It is a very common need to call event.preventDefault() or event.stopPropagation() inside event handlers. Although we can do this easily inside methods, it would be better if the methods can be purely about data logic rather than having to deal with DOM event details.

<!-- just the modifier -->
<form @submit.prevent></form>

https://vuejs.org/guide/essentials/event-handling#event-modifiers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant