Openverse is a search engine for openly-licensed media. This monorepo includes all application code.
Send SELECT_SEARCH_RESULT event only on left-mouse clicks (#3472)
Alec Neevel6d6b1239085a
diff --git a/frontend/src/components/VImageCell/VImageCell.vue b/frontend/src/components/VImageCell/VImageCell.vueindex a25f33792..90efb0311 100644--- a/frontend/src/components/VImageCell/VImageCell.vue+++ b/frontend/src/components/VImageCell/VImageCell.vue@@ -183,7 +183,15 @@ export default defineComponent({})const { sendCustomEvent } = useAnalytics()- const sendSelectSearchResultEvent = () => {++ /**+ * If the user left clicks on a search result, send+ * the SELECT_SEARCH_RESULT custom event+ * @param event - the mouse click event+ */+ const sendSelectSearchResultEvent = (event: MouseEvent) => {+ if (event.button !== 0) return+sendCustomEvent("SELECT_SEARCH_RESULT", {id: props.image.id,kind: props.kind,