bigskysoftware / bigskysoftware/htmx

Form submits repeatedly on enter key hold with autofocus and hx-boost

Open
#3,326 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
49.4k
Forks
1.7k
Avg merge
3d 22h
Merged PRs (30d)
30

Description

I have the following code. When I have focused the input and press the enter key it submits the form but it still submits the form until I release the enter key. This seems to happen because of the `autofocus` and `hx-boost`.

```html

```

When I remove the `autofocus`, it won't focus the input so it won't submit the form again.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.