Open dominic-p opened 3 years ago
Actually, this seems to happen anytime a calendar is "refreshed". If you turn off the display of a calendar the windows jumps to the top and when you turn it back on it jumps as well. When you drag a calendar event, the calendar is refreshed, so that seems to be what's triggering this.
hello @dominic-p, im trying to reproduce this error, but no jump on my side.
can you please send a screenshot of your settings on the calendar
Thanks for looking into this. Here are the settings:
And a quick screencast of the scroll jump. It almost looks like the window is already scrolled to the top in your video?
@GretaD any luck reproducing this on your end?
@GretaD any luck reproducing this on your end?
Hey sorry for the late reply, i was on holiday. Will get back to you soon
I can reproduce it.
Awesome! Thanks for working on this. Let me know if there's anything I can do to help at this point.
Awesome! Thanks for working on this. Let me know if there's anything I can do to help at this point.
Thank you. This is low priority so it might take some time for us to work on it. But if you have development skills, you can have a look and debug it and shoot a PR. Or only debug it and see why this happens, any kind of insight is helpful.
If you need help to set a dev env, let me know.
Thanks for the feedback. I can try to take a look. Any advice on where I should start? I'm not familiar with the code base at all right now.
Thanks for the feedback. I can try to take a look. Any advice on where I should start? I'm not familiar with the code base at all right now.
I would suggest to set up a dev environment according to these steps. theres also this link if you use ubuntu.
and then clone only calendar app. After you have your environment working, you can start testing stuff.
Thanks for the tips. I appreciate it.
I guess I was more asking where in the code base you think I should start. Since this is a fairly recent regression, have there been any changes to the month view components that I should look at? It's kind of a tough thing to debug.
Ah, i see :)
Then maybe have a look at the last release: https://github.com/nextcloud/calendar/releases/tag/v2.3.2 Here are the commits to see what code a certain PR changed: https://github.com/nextcloud/calendar/compare/v2.3.2...master
Living with this more, I think I might understand why this is happening. When you make a change (e.g. drag and drop), several of the calendars will refresh. All of the events for each calendar will disappear and then pop back in after the refresh. As each calendar pops back in, scroll jumps up a bit. So, in my original post, I might have just had a day with a lot of events that caused it to jump up all of the way.
Anyway, if I'm right, then maybe a technique like this could solve the problem. The trick would be recognizing when to "remember" the scroll position and when to reload it.
Steps to reproduce
Expected behaviour
The window scroll position should not change
Actual behaviour
The window scrolls to the top
Calendar app
Calendar app version: 2.3.1
Nextcloud version: 20.0.11
CalDAV-clients used: NA
Client configuration
Browser: Firefox 90.0.1
Operating system: Windows 10
Browser log
It's not a huge deal. It's just a bit annoying to have to scroll back down each time I drag something and the window jumps to the top. This may be related to #2967 not sure.
Thanks, as always, for the great software.