-
Notifications
You must be signed in to change notification settings - Fork 13.4k
fixes #28696 #28725
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fixes #28696 #28725
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -890,6 +890,22 @@ | |
return "\u2212"; // "\u2212" is '−' minus sign | ||
} | ||
|
||
$(".search-input").on("keyup",function() { | ||
if ($(this).val().length === 0) { | ||
window.history.pushState("", "std - Rust", "?search="); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Either use There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. thanks for the advice @nagisa I am going to change that |
||
$('#main.content').removeClass('hidden'); | ||
$('#search.content').addClass('hidden'); | ||
} | ||
}); | ||
|
||
$('.search-input').on('search', function () { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah, also, There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I added search for webkit for ("X") in chrome... or maybe remove X in chrome... what do you think? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just use a standard event ( |
||
if ($(this).val().length === 0) { | ||
window.history.pushState("", "std - Rust", "?search="); | ||
$('#main.content').removeClass('hidden'); | ||
$('#search.content').addClass('hidden'); | ||
} | ||
}); | ||
|
||
$("#toggle-all-docs").on("click", function() { | ||
var toggle = $("#toggle-all-docs"); | ||
if (toggle.hasClass("will-expand")) { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please move content of the handler into the already existing handler (near the top of
function startSearch
).