Calendar view refreshes and jumps to current month on any ajax update

Created on 23 November 2022, over 1 year ago
Updated 8 June 2023, about 1 year ago

Problem/Motivation

The calendar table display refreshes on any ajax update causing the calendar to jump to the current date or initial state. This is bad because if the user jumps between months they get pulled back to the initial (or current) month.

Steps to reproduce

Create a calendar view of any type. Visit page. Trigger any ajax task on the page. (Or let a module do recurring ajax calls)

- In my case I have the Simple less module and the private message module installed. Simple less has a live CSS refresh functionality which is kicking in ajax calls every 1 second. With that module active the calendar jumped back every second, when I close it there is also the private messages module which has a block for notifications that pulls ajax data every 10 seconds if there is a new message. So thats how I knew that this issue was triggered by an ajax call.

Proposed resolution

I'm not that much of an expert but I think; in the js/fullcalendar_view.js on line 367 there is a function that is called after ajaxComplete(). Since there are lots of things using ajax it would be best to restrict those functions to specific ajax events made by the calendar somehow.

🐛 Bug report
Status

Closed: works as designed

Version

5.1

Component

Code

Created by

🇹🇷Turkey RgnYLDZ

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024