mirror of
https://github.com/jaywcjlove/reference.git
synced 2025-06-17 12:41:20 +08:00
website: fix search page turning error. #32
This commit is contained in:
@ -78,7 +78,8 @@ document.addEventListener('keydown', (ev) => {
|
|||||||
searchBox.classList.contains('show') ? hideSearch() : showSearch();
|
searchBox.classList.contains('show') ? hideSearch() : showSearch();
|
||||||
}
|
}
|
||||||
if (ev.key.toLocaleLowerCase() === 'enter') {
|
if (ev.key.toLocaleLowerCase() === 'enter') {
|
||||||
window.location.href = getDocUrl(activeMenu.path)
|
const url = activeMenu.path || activeMenu?.item.path;
|
||||||
|
window.location.href = getDocUrl(url);
|
||||||
}
|
}
|
||||||
if (ev.key.toLocaleLowerCase() === 'arrowdown') {
|
if (ev.key.toLocaleLowerCase() === 'arrowdown') {
|
||||||
activeAnchorElm('down')
|
activeAnchorElm('down')
|
||||||
|
Reference in New Issue
Block a user