Commit 2abc85c
fix: prevent Enter key from submitting form to non-existent /search route
Pressing Enter in the URL input submitted the form via GET to /search,
which has no route and returned a 404 ("NotFoundError: Not Found").
The download was only wired to the button's click handler.
Intercept the form's submit event, prevent the default navigation, and
trigger the same socket-based download. Enter now works like clicking the
download button. Logic extracted into a shared startDownload() function.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent be3e857 commit 2abc85c
1 file changed
Lines changed: 13 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
67 | | - | |
68 | | - | |
69 | | - | |
| 67 | + | |
| 68 | + | |
70 | 69 | | |
| 70 | + | |
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
74 | 84 | | |
75 | 85 | | |
76 | 86 | | |
| |||
0 commit comments