nicolium: fix hotkeys

Signed-off-by: nicole mikołajczyk <git@mkljczk.pl>
This commit is contained in:
nicole mikołajczyk
2026-03-06 12:04:18 +01:00
parent af276da1be
commit 2e737331f9

View File

@ -216,9 +216,9 @@ function useHotkeys<T extends HTMLElement>(handlers: HandlerMap) {
});
// Sort all matches by priority
matchCandidates.toSorted((a, b) => b.priority - a.priority);
const sortedCandidates = matchCandidates.toSorted((a, b) => b.priority - a.priority);
const bestMatchingHandler = matchCandidates.at(0)?.handler;
const bestMatchingHandler = sortedCandidates.at(0)?.handler;
if (bestMatchingHandler) {
const result = bestMatchingHandler(event);
if (result !== false) {