Skip to content

Commit 3f0ffd9

Browse files
committed
#search -> #searchfield
We have headers titled “Search” (which got the same ID)
1 parent 2e9c5c0 commit 3f0ffd9

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

layouts/header.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<li><a href="/changes/" class="nav-blog">Blog</a></li>
99
<li><a href="https://github.com/contact">Support</a></li>
1010
<li id="search-container">
11-
<input type="text" id="search" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" /><label class="search-placeholder">Search</label>
11+
<input type="text" id="searchfield" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" /><label class="search-placeholder">Search</label>
1212
<div class="cancel-search"></div>
1313
<ul id="search-results">
1414

static/shared/css/documentation.css

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ a img {
340340
margin-left: 5px;
341341
}
342342

343-
#search {
343+
#searchfield {
344344
border: 1px solid #dddddd;
345345
line-height: 20px;
346346
height: 21px;
@@ -357,11 +357,11 @@ a img {
357357
transition: width 0.3s ease-in-out 0s;
358358
}
359359

360-
#search:focus, #search-container.active #search {
360+
#searchfield:focus, #search-container.active #searchfield {
361361
width: 120px;
362362
}
363363

364-
#search:focus + .search-placeholder, #search-container.active .search-placeholder {
364+
#searchfield:focus + .search-placeholder, #search-container.active .search-placeholder {
365365
opacity: 0;
366366
}
367367

@@ -411,7 +411,7 @@ a img {
411411
opacity: 0;
412412
}
413413

414-
#search-container.active #search:focus ~ #search-results, #search-results:active, #search-results:focus {
414+
#search-container.active #searchfield:focus ~ #search-results, #search-results:active, #search-results:focus {
415415
visibility: visible;
416416
opacity: 1;
417417
-webkit-transition: opacity 0.3s ease-in-out 0s;
@@ -1523,7 +1523,7 @@ li.api-status img {
15231523
background-size: 186px 27px;
15241524
}
15251525

1526-
#search {
1526+
#searchfield {
15271527
background-image: url(/shared/images/[email protected]);
15281528
background-size: 13px 13px;
15291529
}

static/shared/js/documentation.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ $(function() {
141141
}
142142

143143
// On input change, update the search results
144-
$("#search").on("input", function(e) {
144+
$("#searchfield").on("input", function(e) {
145145
$(this).val().length > 0 ? $("#search-container").addClass("active") : $("#search-container").removeClass("active");
146146

147147
searchForString($(this).val());
@@ -151,19 +151,19 @@ $(function() {
151151
$("body").keyup(function(e) {
152152
if (e.keyCode == 83) {
153153
// S key
154-
if ($("#search").is(":focus"))
154+
if ($("#searchfield").is(":focus"))
155155
return;
156156

157157
e.preventDefault();
158-
$("#search").focus();
158+
$("#searchfield").focus();
159159
}
160160
});
161161

162162
// Keyboard support for the search field
163-
$("#search").keyup(function(e) {
163+
$("#searchfield").keyup(function(e) {
164164
if (e.keyCode == 27) {
165165
// ESC
166-
$("#search").val().length > 0 ? cancelSearch() : $("#search").blur();
166+
$("#searchfield").val().length > 0 ? cancelSearch() : $("#searchfield").blur();
167167
} else if (e.keyCode == 13) {
168168
// Return/enter
169169
e.preventDefault();
@@ -187,7 +187,7 @@ $(function() {
187187

188188
function cancelSearch() {
189189
$("#search-container").removeClass("active");
190-
$("#search").val("");
190+
$("#searchfield").val("");
191191
}
192192

193193
function searchForString(searchString) {

0 commit comments

Comments
 (0)