Skip to content

Commit f7c5439

Browse files
authored
Fix not scrolling in search results when ArrowUp or ArrowDown for Aliki (#1587)
If we use Up arrow key or Down arrow key in search results, the scroll bar doesn't scroll, instead, the scroll bar of the whole page scroll. This PR fixes it.
1 parent 66ef95a commit f7c5439

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

lib/rdoc/generator/template/aliki/js/aliki.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,6 @@ function createSearchInstance(input, result) {
7070
window.location.href = result.firstChild.firstChild.href;
7171
}
7272

73-
search.scrollIntoView = search.scrollInWindow;
74-
7573
return search;
7674
}
7775

lib/rdoc/generator/template/aliki/js/search_controller.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ SearchController.prototype = Object.assign({}, SearchNavigation, new function()
9696
this.current.classList.remove('search-selected');
9797
next.classList.add('search-selected');
9898
this.input.setAttribute('aria-activedescendant', next.getAttribute('id'));
99-
this.scrollIntoView(next, this.view);
99+
this.scrollInElement(next, this.result);
100100
this.current = next;
101101
this.input.value = next.firstChild.firstChild.text;
102102
this.input.select();

0 commit comments

Comments
 (0)