mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-04 15:58:49 +01:00
This commit is contained in:
parent
833e466544
commit
231b3a65c8
1 changed files with 18 additions and 0 deletions
|
|
@ -992,6 +992,24 @@ export const genSearch = (app: App, config: ISearchOption, element: Element, clo
|
|||
edit,
|
||||
});
|
||||
event.preventDefault();
|
||||
} else if (Constants.KEYCODELIST[event.keyCode] === "PageUp") {
|
||||
const previousElement = element.querySelector('[data-type="previous"]');
|
||||
if (!previousElement.getAttribute("disabled")) {
|
||||
if (config.page > 1) {
|
||||
config.page--;
|
||||
inputTimeout = inputEvent(element, config, inputTimeout, edit);
|
||||
}
|
||||
}
|
||||
event.preventDefault();
|
||||
} else if (Constants.KEYCODELIST[event.keyCode] === "PageDown") {
|
||||
const nextElement = element.querySelector('[data-type="next"]');
|
||||
if (!nextElement.getAttribute("disabled")) {
|
||||
if (config.page < parseInt(nextElement.parentElement.querySelector("#searchResult").getAttribute("data-pagecount"))) {
|
||||
config.page++;
|
||||
inputTimeout = inputEvent(element, config, inputTimeout, edit);
|
||||
}
|
||||
}
|
||||
event.preventDefault();
|
||||
}
|
||||
});
|
||||
replaceInputElement.addEventListener("keydown", (event: KeyboardEvent) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue