Skip to content

Commit ae6c7e6

Browse files
committed
Review comments for JS
1 parent 734afb4 commit ae6c7e6

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

src/librustdoc/html/static/main.js

+2-8
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,6 @@ function defocusSearchBar() {
365365
function handleEscape(ev) {
366366
var help = getHelpElement();
367367
var search = getSearchElement();
368-
hideModal();
369368
if (hasClass(help, "hidden") === false) {
370369
displayHelp(false, ev, help);
371370
} else if (hasClass(search, "hidden") === false) {
@@ -398,7 +397,6 @@ function defocusSearchBar() {
398397
case "s":
399398
case "S":
400399
displayHelp(false, ev);
401-
hideModal();
402400
ev.preventDefault();
403401
focusSearchBar();
404402
break;
@@ -411,7 +409,6 @@ function defocusSearchBar() {
411409

412410
case "?":
413411
if (ev.shiftKey) {
414-
hideModal();
415412
displayHelp(true, ev);
416413
}
417414
break;
@@ -2639,13 +2636,10 @@ function defocusSearchBar() {
26392636
});
26402637
}());
26412638

2642-
function showImportantTraits(content) {
2643-
let list = content.classList
2644-
}
2645-
26462639
onEachLazy(document.getElementsByClassName("important-traits"), function(e) {
26472640
e.onclick = function() {
2648-
e.getElementsByClassName('important-traits-tooltiptext')[0].classList.toggle("force-tooltip")
2641+
this.getElementsByClassName('important-traits-tooltiptext')[0]
2642+
.classList.toggle("force-tooltip");
26492643
};
26502644
});
26512645

0 commit comments

Comments
 (0)