Skip to content
Permalink
Browse files

Fix search results interactions

  • Loading branch information...
GuillaumeGomez committed Feb 9, 2019
1 parent 618f5a0 commit 69d948d3477c208e4954d603f20d87782c7ea401
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/librustdoc/html/static/main.js
@@ -1197,7 +1197,7 @@ if (!DOMTokenList.prototype.remove) {
var actives = [[], [], []];
// "current" is used to know which tab we're looking into.
var current = 0;
onEachLazy(document.getElementsByClassName("search-results"), function(e) {
onEachLazy(document.getElementById("results").childNodes, function(e) {
onEachLazy(e.getElementsByClassName("highlighted"), function(e) {
actives[current].push(e);
});
@@ -1214,7 +1214,7 @@ if (!DOMTokenList.prototype.remove) {
removeClass(actives[currentTab][0], "highlighted");
} else if (e.which === 40) { // down
if (!actives[currentTab].length) {
var results = document.getElementsByClassName("search-results");
var results = document.getElementById("results").childNodes;
if (results.length > 0) {
var res = results[currentTab].getElementsByClassName("result");
if (res.length > 0) {

0 comments on commit 69d948d

Please sign in to comment.
You can’t perform that action at this time.