Skip to content

Commit

Permalink
fix: keypress submit error
Browse files Browse the repository at this point in the history
  • Loading branch information
jeanvier committed Jan 26, 2024
1 parent 3dd9d79 commit a8e0426
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@wgr-sa/nuxt-form",
"description": "Form builder for Nuxt",
"version": "0.7.8",
"version": "0.7.9",
"repository": "https://github.com/WGR-SA/nuxt-form.git",
"author": "jeanvier",
"license": "MIT",
Expand Down
3 changes: 2 additions & 1 deletion src/runtime/components/FormSubmit.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ const submit = async () => {
}
onMounted(() => {
document.addEventListener('keypress', function (event) {
document.addEventListener('keypress', function (event) {
event.preventDefault();
if (event.key === 'Enter') {
submit()
}
Expand Down

0 comments on commit a8e0426

Please sign in to comment.