Skip to content

Commit

Permalink
Merge pull request #5865 from nextcloud/Fix/calendar-grid-event-click
Browse files Browse the repository at this point in the history
Fix: can't click on widget event after conversation change in Talk
  • Loading branch information
hamza221 authored Mar 21, 2024
2 parents 74523ae + 25069ad commit 8c5c2ce
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/components/CalendarGrid.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
6 changes: 3 additions & 3 deletions src/fullcalendar/interaction/eventClick.js
Original file line number Diff line number Diff line change
Expand Up @@ -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':
Expand Down

0 comments on commit 8c5c2ce

Please sign in to comment.