main.js: handleEscape and handleShortcut accept KeyboardEvent
This commit is contained in:
@@ -518,7 +518,9 @@ function preLoadCss(cssUrl) {
|
|||||||
openParentDetails(document.getElementById(id));
|
openParentDetails(document.getElementById(id));
|
||||||
}
|
}
|
||||||
|
|
||||||
// @ts-expect-error
|
/**
|
||||||
|
* @param {KeyboardEvent} ev
|
||||||
|
*/
|
||||||
function handleEscape(ev) {
|
function handleEscape(ev) {
|
||||||
// @ts-expect-error
|
// @ts-expect-error
|
||||||
searchState.clearInputTimeout();
|
searchState.clearInputTimeout();
|
||||||
@@ -530,7 +532,9 @@ function preLoadCss(cssUrl) {
|
|||||||
window.hideAllModals(true); // true = reset focus for tooltips
|
window.hideAllModals(true); // true = reset focus for tooltips
|
||||||
}
|
}
|
||||||
|
|
||||||
// @ts-expect-error
|
/**
|
||||||
|
* @param {KeyboardEvent} ev
|
||||||
|
*/
|
||||||
function handleShortcut(ev) {
|
function handleShortcut(ev) {
|
||||||
// Don't interfere with browser shortcuts
|
// Don't interfere with browser shortcuts
|
||||||
const disableShortcuts = getSettingValue("disable-shortcuts") === "true";
|
const disableShortcuts = getSettingValue("disable-shortcuts") === "true";
|
||||||
|
|||||||
Reference in New Issue
Block a user