diff --git a/client/src/components/History/Content/ContentItem.vue b/client/src/components/History/Content/ContentItem.vue index 67174d35dcbe..0e5497d645cf 100644 --- a/client/src/components/History/Content/ContentItem.vue +++ b/client/src/components/History/Content/ContentItem.vue @@ -72,7 +72,6 @@ const emit = defineEmits<{ (e: "tag-change", item: any, newTags: Array): void; (e: "tag-click", tag: string): void; (e: "toggleHighlights", item: any): void; - (e: "update:item-focused"): void; }>(); const entryPointStore = useEntryPointStore(); @@ -185,6 +184,7 @@ function onKeyDown(event: KeyboardEvent) { } if (event.key === "Enter" || event.key === " ") { + event.preventDefault(); onClick(event); } else if ((event.key === "ArrowUp" || event.key === "ArrowDown") && event.shiftKey) { event.preventDefault(); @@ -207,7 +207,8 @@ function onKeyDown(event: KeyboardEvent) { } } -function onClick(event: KeyboardEvent) { +function onClick(e: Event) { + const event = e as KeyboardEvent; if (event && event.shiftKey && isSelectKey(event)) { emit("selected-to", false); } else if (event && isSelectKey(event)) { @@ -286,6 +287,12 @@ function onTagClick(tag: string) { function toggleHighlights() { emit("toggleHighlights", props.item); } + +function unexpandedClick(event: Event) { + if (!props.expandDataset) { + onClick(event); + } +}