--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/resources/search.js Fri Sep 14 14:24:00 2018 +0300
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/resources/search.js Fri Sep 14 14:45:31 2018 +0200
@@ -132,24 +132,18 @@
} else {
label = item.l;
}
- $li = $("<li/>").appendTo(ul);
+ var li = $("<li/>").appendTo(ul);
if (item.category === catSearchTags) {
if (item.d) {
- $("<a/>").attr("href", "#")
- .html(label + "<span class=\"searchTagHolderResult\"> (" + item.h + ")</span><br><span class=\"searchTagDescResult\">"
- + item.d + "</span><br>")
- .appendTo($li);
+ li.html(label + "<span class=\"searchTagHolderResult\"> (" + item.h + ")</span><br><span class=\"searchTagDescResult\">"
+ + item.d + "</span><br>");
} else {
- $("<a/>").attr("href", "#")
- .html(label + "<span class=\"searchTagHolderResult\"> (" + item.h + ")</span>")
- .appendTo($li);
+ li.html(label + "<span class=\"searchTagHolderResult\"> (" + item.h + ")</span>");
}
} else {
- $("<a/>").attr("href", "#")
- .html(label)
- .appendTo($li);
+ li.html(label);
}
- return $li;
+ return li;
}
});
$(function() {
@@ -328,6 +322,7 @@
} else {
window.location.href = pathtoroot + url;
}
+ $("#search").focus();
}
}
});