mirror of
https://github.com/DustinBrett/daedalOS.git
synced 2025-12-06 00:20:05 +01:00
This commit is contained in:
parent
48f951db2e
commit
965c2dcc37
|
|
@ -11,7 +11,7 @@ import { type FileManagerViewNames } from "components/system/Files/Views";
|
|||
import { useFileSystem } from "contexts/fileSystem";
|
||||
import { useProcesses } from "contexts/process";
|
||||
import { useSession } from "contexts/session";
|
||||
import { PREVENT_SCROLL } from "utils/constants";
|
||||
import { PREVENT_SCROLL, SHORTCUT_EXTENSION } from "utils/constants";
|
||||
import { haltEvent, sendMouseClick } from "utils/functions";
|
||||
|
||||
type KeyboardShortcutEntry = (file?: string) => React.KeyboardEventHandler;
|
||||
|
|
@ -264,7 +264,9 @@ const useFileKeyboardShortcuts = (
|
|||
blurEntry();
|
||||
focusEntry(focusOnEntry);
|
||||
fileManagerRef.current
|
||||
?.querySelector(`button[aria-label='${focusOnEntry}']`)
|
||||
?.querySelector(
|
||||
`button[aria-label='${focusOnEntry.replace(SHORTCUT_EXTENSION, "")}']`
|
||||
)
|
||||
?.scrollIntoView();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@ import {
|
|||
MAX_RES_ICON_OVERRIDE,
|
||||
ONE_TIME_PASSIVE_EVENT,
|
||||
PREVENT_SCROLL,
|
||||
SHORTCUT_EXTENSION,
|
||||
SUPPORTED_ICON_SIZES,
|
||||
TASKBAR_HEIGHT,
|
||||
TIMESTAMP_DATE_FORMAT,
|
||||
|
|
@ -430,7 +431,9 @@ export const updateIconPositionsIfEmpty = (
|
|||
|
||||
if (!iconPositions[entryUrl]) {
|
||||
const gridEntry = [...gridElement.children].find((element) =>
|
||||
element.querySelector(`button[aria-label="${entry}"]`)
|
||||
element.querySelector(
|
||||
`button[aria-label="${entry.replace(SHORTCUT_EXTENSION, "")}"]`
|
||||
)
|
||||
);
|
||||
|
||||
if (gridEntry instanceof HTMLElement) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user