@@ -49,7 +49,7 @@ function printTab(nb) {
49
49
let iter = 0 ;
50
50
let foundCurrentTab = false ;
51
51
let foundCurrentResultSet = false ;
52
- onEachLazy ( document . getElementById ( "titles " ) . childNodes , elem => {
52
+ onEachLazy ( document . getElementById ( "search-tabs " ) . childNodes , elem => {
53
53
if ( nb === iter ) {
54
54
addClass ( elem , "selected" ) ;
55
55
foundCurrentTab = true ;
@@ -1490,7 +1490,7 @@ function initSearch(rawSearchIndex) {
1490
1490
function focusSearchResult ( ) {
1491
1491
const target = searchState . focusedByTab [ searchState . currentTab ] ||
1492
1492
document . querySelectorAll ( ".search-results.active a" ) . item ( 0 ) ||
1493
- document . querySelectorAll ( "#titles > button" ) . item ( searchState . currentTab ) ;
1493
+ document . querySelectorAll ( "#search-tabs button" ) . item ( searchState . currentTab ) ;
1494
1494
searchState . focusedByTab [ searchState . currentTab ] = null ;
1495
1495
if ( target ) {
1496
1496
target . focus ( ) ;
@@ -1645,9 +1645,9 @@ function initSearch(rawSearchIndex) {
1645
1645
function makeTabHeader ( tabNb , text , nbElems ) {
1646
1646
if ( searchState . currentTab === tabNb ) {
1647
1647
return "<button class=\"selected\">" + text +
1648
- " <div class=\"count\">(" + nbElems + ")</div ></button>" ;
1648
+ " <span class=\"count\">(" + nbElems + ")</span ></button>" ;
1649
1649
}
1650
- return "<button>" + text + " <div class=\"count\">(" + nbElems + ")</div ></button>" ;
1650
+ return "<button>" + text + " <span class=\"count\">(" + nbElems + ")</span ></button>" ;
1651
1651
}
1652
1652
1653
1653
/**
@@ -1712,12 +1712,12 @@ function initSearch(rawSearchIndex) {
1712
1712
let output = `<h1 class="search-results-title">Results${ crates } </h1>` ;
1713
1713
if ( results . query . error !== null ) {
1714
1714
output += `<h3>Query parser error: "${ results . query . error } ".</h3>` ;
1715
- output += "<div id=\"titles \">" +
1715
+ output += "<div id=\"search-tabs \">" +
1716
1716
makeTabHeader ( 0 , "In Names" , ret_others [ 1 ] ) +
1717
1717
"</div>" ;
1718
1718
currentTab = 0 ;
1719
1719
} else if ( results . query . foundElems <= 1 && results . query . returned . length === 0 ) {
1720
- output += "<div id=\"titles \">" +
1720
+ output += "<div id=\"search-tabs \">" +
1721
1721
makeTabHeader ( 0 , "In Names" , ret_others [ 1 ] ) +
1722
1722
makeTabHeader ( 1 , "In Parameters" , ret_in_args [ 1 ] ) +
1723
1723
makeTabHeader ( 2 , "In Return Types" , ret_returned [ 1 ] ) +
@@ -1727,7 +1727,7 @@ function initSearch(rawSearchIndex) {
1727
1727
results . query . elems . length === 0 ? "In Function Return Types" :
1728
1728
results . query . returned . length === 0 ? "In Function Parameters" :
1729
1729
"In Function Signatures" ;
1730
- output += "<div id=\"titles \">" +
1730
+ output += "<div id=\"search-tabs \">" +
1731
1731
makeTabHeader ( 0 , signatureTabTitle , ret_others [ 1 ] ) +
1732
1732
"</div>" ;
1733
1733
currentTab = 0 ;
@@ -1747,7 +1747,7 @@ function initSearch(rawSearchIndex) {
1747
1747
search . appendChild ( resultsElem ) ;
1748
1748
// Reset focused elements.
1749
1749
searchState . showResults ( search ) ;
1750
- const elems = document . getElementById ( "titles " ) . childNodes ;
1750
+ const elems = document . getElementById ( "search-tabs " ) . childNodes ;
1751
1751
searchState . focusedByTab = [ ] ;
1752
1752
let i = 0 ;
1753
1753
for ( const elem of elems ) {
0 commit comments