Skip to content

Commit

Permalink
IBX-4064: Fix search dropdown breadcrumbs VS highlight (#2558)
Browse files Browse the repository at this point in the history
  • Loading branch information
adriendupuis authored Nov 29, 2024
1 parent 2145f26 commit c636be4
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions docs/js/custom.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ $(document).ready(function() {
'href',
$(this)
.attr('href')
.replace('master/docs/', branchName + '/docs/')
.replace('master/docs/', branchName + '/docs/'),
);
});

Expand Down Expand Up @@ -153,11 +153,11 @@ $(document).ready(function() {
const category = $(element).find('.algolia-docsearch-suggestion--subcategory-column-text');
category.append(separatorHtml);
if (title.find('.' + separatorClass).length) {
$.each(title.contents(), (i, e) => {
if (title.contents().length > 1) {
$(e).appendTo(category);
}
});
const titleParts = title.html().split(separatorHtml);
for (let i = 0; i < titleParts.length - 1; i++) {
category.html(category.html() + titleParts[i] + separatorHtml);
}
title.html(titleParts[titleParts.length - 1]);
}
if (separatorText != category.text().trim().slice(-1)) {
category.append(separatorHtml);
Expand Down Expand Up @@ -209,7 +209,7 @@ $(document).ready(function() {
if ($('.md-sidebar--secondary .md-nav__link--active').length) {
$('.md-sidebar--secondary .md-nav__link--active')[0].scrollIntoView({
behavior: 'instant',
block: 'nearest'
block: 'nearest',
});
} else {
$('.md-sidebar--secondary .md-sidebar__scrollwrap').scrollTop(0);
Expand Down

0 comments on commit c636be4

Please sign in to comment.