From 69d948d3477c208e4954d603f20d87782c7ea401 Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Sun, 10 Feb 2019 00:37:44 +0100 Subject: [PATCH] Fix search results interactions --- src/librustdoc/html/static/main.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/librustdoc/html/static/main.js b/src/librustdoc/html/static/main.js index 877ac9a62bb..5ec938ae106 100644 --- a/src/librustdoc/html/static/main.js +++ b/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) {