Skip to content

Commit 8c5c2ce

Browse files
authored
Merge pull request #5865 from nextcloud/Fix/calendar-grid-event-click
Fix: can't click on widget event after conversation change in Talk
2 parents 74523ae + 25069ad commit 8c5c2ce

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/components/CalendarGrid.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ export default {
119119
editable: this.isEditable,
120120
selectable: this.isAuthenticatedUser,
121121
eventAllow,
122-
eventClick: eventClick(this.$store, this.$router, this.$route, window, this.isWidget, this.$refs.fullCalendar),
122+
eventClick: eventClick(this.$store, this.$router, this.$route, window, this.isWidget, this.$refs),
123123
eventDrop: this.isWidget ? false : (...args) => eventDrop(this.$store, this.$refs.fullCalendar.getApi())(...args),
124124
eventResize: this.isWidget ? false : eventResize(this.$store),
125125
navLinkDayClick: this.isWidget ? false : navLinkDayClick(this.$router, this.$route),

src/fullcalendar/interaction/eventClick.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,14 @@ import { emit } from '@nextcloud/event-bus'
3737
* @param {object} route The current Vue route
3838
* @param {Window} window The window object
3939
* @param {boolean} isWidget Whether the calendar is embedded in a widget
40-
* @param {object} widgetRef
40+
* @param {object} ref The ref object of CalendarGrid component
4141
* @return {Function}
4242
*/
43-
export default function(store, router, route, window, isWidget = false, widgetRef = undefined) {
43+
export default function(store, router, route, window, isWidget = false, ref = undefined) {
4444

4545
return function({ event }) {
4646
if (isWidget) {
47-
store.commit('setWidgetRef', { widgetRef: widgetRef.$el })
47+
store.commit('setWidgetRef', { widgetRef: ref.fullCalendar.$el })
4848
}
4949
switch (event.extendedProps.objectType) {
5050
case 'VEVENT':

0 commit comments

Comments
 (0)