Skip to content

Commit 81e72b5

Browse files
committed
Wrap the search field in a <form> element
This should have no effect on the behavior or appearance of the search box, except that it enables features like right-click -> "Add a keyword for this search" in Firefox and other browsers.
1 parent 2f93fdb commit 81e72b5

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

app/styles/app.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ body {
119119
@media only screen and (max-width: 820px) {
120120
.menu { display: block; }
121121
.nav { display: none; }
122-
div.search { display: none; }
122+
form.search { display: none; }
123123
}
124124
}
125125

app/templates/application.hbs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@
1111
<h1>CARGO</h2>
1212
{{/link-to}}
1313

14-
<div class='search'>
15-
{{input type="text" class="search"
14+
<form class='search' action='/search' {{ action "" on="submit" }} >
15+
{{input type="text" class="search" name="q"
1616
placeholder="Search"
1717
value=search
1818
action="search"}}
19-
</div>
19+
</form>
2020

2121
<div class='nav'>
2222
{{#link-to "crates" (query-params letter="null" page=1)}}

0 commit comments

Comments
 (0)