fix(web): escape shortcut handling (#26096)

This commit is contained in:
Michel Heusschen
2026-02-11 18:55:28 +01:00
committed by GitHub
parent e54678e0d6
commit 913904f418
5 changed files with 17 additions and 119 deletions

View File

@@ -242,7 +242,6 @@
<svelte:document
use:shortcuts={[
{ shortcut: { key: 'Escape' }, onShortcut: onEscape },
{ shortcut: { ctrl: true, key: 'k' }, onShortcut: () => input?.select() },
{ shortcut: { ctrl: true, shift: true, key: 'k' }, onShortcut: onFilterClick },
]}

View File

@@ -20,8 +20,10 @@
const handleTagAssets = async () => {
const assets = [...getOwnedAssets()];
await modalManager.show(AssetTagModal, { assetIds: assets.map(({ id }) => id) });
clearSelect();
const didUpdate = await modalManager.show(AssetTagModal, { assetIds: assets.map(({ id }) => id) });
if (didUpdate) {
clearSelect();
}
};
</script>

View File

@@ -21,7 +21,7 @@
import { deleteAssets, updateStackedAssetInTimeline } from '$lib/utils/actions';
import { archiveAssets, cancelMultiselect, selectAllAssets, stackAssets } from '$lib/utils/asset-utils';
import { AssetVisibility } from '@immich/sdk';
import { modalManager } from '@immich/ui';
import { isModalOpen, modalManager } from '@immich/ui';
type Props = {
timelineManager: TimelineManager;
@@ -142,7 +142,7 @@
};
const shortcutList = $derived.by(() => {
if (searchStore.isSearchEnabled || $showAssetViewer) {
if (searchStore.isSearchEnabled || $showAssetViewer || isModalOpen()) {
return [];
}