diff --git a/ui/v2.5/src/components/Changelog/versions/v0161.md b/ui/v2.5/src/components/Changelog/versions/v0161.md index ab96c0e70..1e291a565 100644 --- a/ui/v2.5/src/components/Changelog/versions/v0161.md +++ b/ui/v2.5/src/components/Changelog/versions/v0161.md @@ -1,4 +1,5 @@ ### 🐛 Bug fixes +* Fix keyboard shortcuts not working after selecting an object. ([#2750](https://github.com/stashapp/stash/pull/2750)) * Fix UI crash on session timeout. ([#2755](https://github.com/stashapp/stash/pull/2755)) * Fix incorrect scene metadata being set when video has cover art. ([#2752](https://github.com/stashapp/stash/pull/2752)) * Fix incorrect image being displayed when first previewing image. ([#2754](https://github.com/stashapp/stash/pull/2754)) diff --git a/ui/v2.5/src/components/List/ListOperationButtons.tsx b/ui/v2.5/src/components/List/ListOperationButtons.tsx index 671f3bde2..15a94b75e 100644 --- a/ui/v2.5/src/components/List/ListOperationButtons.tsx +++ b/ui/v2.5/src/components/List/ListOperationButtons.tsx @@ -47,24 +47,23 @@ export const ListOperationButtons: React.FC = ({ Mousetrap.bind("s a", () => onSelectAll?.()); Mousetrap.bind("s n", () => onSelectNone?.()); - if (itemsSelected) { - Mousetrap.bind("e", () => { + Mousetrap.bind("e", () => { + if (itemsSelected) { onEdit?.(); - }); + } + }); - Mousetrap.bind("d d", () => { + Mousetrap.bind("d d", () => { + if (itemsSelected) { onDelete?.(); - }); - } + } + }); return () => { Mousetrap.unbind("s a"); Mousetrap.unbind("s n"); - - if (itemsSelected) { - Mousetrap.unbind("e"); - Mousetrap.unbind("d d"); - } + Mousetrap.unbind("e"); + Mousetrap.unbind("d d"); }; }); diff --git a/ui/v2.5/src/components/Shared/GridCard.tsx b/ui/v2.5/src/components/Shared/GridCard.tsx index 3248ab2db..f14693e74 100644 --- a/ui/v2.5/src/components/Shared/GridCard.tsx +++ b/ui/v2.5/src/components/Shared/GridCard.tsx @@ -65,7 +65,8 @@ export const GridCard: React.FC = (props: ICardProps) => { return ( props.onSelectedChanged!(!props.selected, shiftKey)} onClick={(event: React.MouseEvent) => {