bigskysoftware / bigskysoftware/htmx

Need to add a fake hx-post to a form to prevent it submitting by default

Open
#2,323 5 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

When I have focus in the text input and press enter to submit, two requests are made; one to / (there's no action on the form) and one to /ingredients/tags/edit.

```


Save



```

If I instead put a dummy hx-post on the form, only the input's submit actually takes place (which is what I want). I suppose I can probably lift the common hx-put to the form as an alternative, but I do think it's a bug that this occurs.

```


Save



```

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.