From 25069ad3109f26d2027a053a7f2757e325fe6171 Mon Sep 17 00:00:00 2001 From: Hamza Mahjoubi Date: Wed, 20 Mar 2024 16:51:23 +0100 Subject: [PATCH] Fix: can't click on widget event after converstation change in Talk Signed-off-by: Hamza Mahjoubi --- src/components/CalendarGrid.vue | 2 +- src/fullcalendar/interaction/eventClick.js | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/CalendarGrid.vue b/src/components/CalendarGrid.vue index eb4da01ac..4b2d02fcb 100644 --- a/src/components/CalendarGrid.vue +++ b/src/components/CalendarGrid.vue @@ -119,7 +119,7 @@ export default { editable: this.isEditable, selectable: this.isAuthenticatedUser, eventAllow, - eventClick: eventClick(this.$store, this.$router, this.$route, window, this.isWidget, this.$refs.fullCalendar), + eventClick: eventClick(this.$store, this.$router, this.$route, window, this.isWidget, this.$refs), eventDrop: this.isWidget ? false : (...args) => eventDrop(this.$store, this.$refs.fullCalendar.getApi())(...args), eventResize: this.isWidget ? false : eventResize(this.$store), navLinkDayClick: this.isWidget ? false : navLinkDayClick(this.$router, this.$route), diff --git a/src/fullcalendar/interaction/eventClick.js b/src/fullcalendar/interaction/eventClick.js index 1c0756c90..19f2f04bb 100644 --- a/src/fullcalendar/interaction/eventClick.js +++ b/src/fullcalendar/interaction/eventClick.js @@ -37,14 +37,14 @@ import { emit } from '@nextcloud/event-bus' * @param {object} route The current Vue route * @param {Window} window The window object * @param {boolean} isWidget Whether the calendar is embedded in a widget - * @param {object} widgetRef + * @param {object} ref The ref object of CalendarGrid component * @return {Function} */ -export default function(store, router, route, window, isWidget = false, widgetRef = undefined) { +export default function(store, router, route, window, isWidget = false, ref = undefined) { return function({ event }) { if (isWidget) { - store.commit('setWidgetRef', { widgetRef: widgetRef.$el }) + store.commit('setWidgetRef', { widgetRef: ref.fullCalendar.$el }) } switch (event.extendedProps.objectType) { case 'VEVENT':