nicolium: fix hotkeys
Signed-off-by: nicole mikołajczyk <git@mkljczk.pl>
This commit is contained in:
@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user