Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Events get duplicated times when dropping and updating them from the options object #358

Closed
johannesjo opened this issue Jan 16, 2021 · 8 comments
Assignees

Comments

@johannesjo
Copy link

Follow up to: #357

Steps to recreate:

  1. Go to https://codesandbox.io/s/ecstatic-colden-xernn?file=/src/app/app.component.ts
  2. Start to drag around the tasks in the daily agenda view like a mad man.

Result:
Events will be duplicated multiple times until the calendar is completely rererendered (by navigating away and then back).

Is your bug/feature applicable to the core project, without Angular?

I am not sure.

@acerix
Copy link
Member

acerix commented Jan 25, 2021

Thanks, I can see the issue but I'm not sure it's a bug in the calendar. It's best if you can provide a more minimal demo, for example by starting with the example project and only adding the code which causes the bug.

https://codesandbox.io/s/github/fullcalendar/fullcalendar-example-projects/tree/master/angular?file=/src/app/app.component.ts

@johannesjo
Copy link
Author

Here is a little bit more reduced example:
https://codesandbox.io/s/old-wind-7vdf3?file=/src/app/app.component.ts

Please pay attention to line 62. This is the (only) place where the calendar get's updated and the data passed, does not match with what is displayed.

@acerix
Copy link
Member

acerix commented Jan 28, 2021

Thanks for the details. I'm not very familiar with how Angular works and was suspicious the issue was related to setInterval but this does seem like a bug now.

@acerix acerix changed the title Bug: Events get duplicated multiple times when dropping and updating them from the options object Events get duplicated times when dropping and updating them from the options object Jan 28, 2021
@johannesjo
Copy link
Author

@acerix yes, it seems so. Looking at the code for the angular integration my suspicion would be that this is at least partly a problem of fullcalendar itself as the correct options get passed as they should.

And if I may say so: Additionally the part with pauseRendering and resumeRendering smells like a race condition looming somewhere :)

@johannesjo
Copy link
Author

johannesjo commented Feb 5, 2021

After playing around with it some more I recognized, that this seems (at least also) to be happening while an event is being dragged around and not necessarily when it is dropped.

EDIT: Though it also happens only after an event was resized.

@johannesjo
Copy link
Author

johannesjo commented Feb 18, 2021

Would you accept PRs in case I find the cause of it? Unfortunately that's a real blocker for Super Productivity's calendar feature.

@shyamal890
Copy link

I am able to reproduce this issue too @acerix

@arshaw
Copy link
Member

arshaw commented Dec 9, 2022

This ticket is superseded by the other ticket you made @johannesjo:
fullcalendar/fullcalendar#6218 (comment)

Could you please visit the link, give a 👍 to vote (?), press the 🔈Subscribe button to receive updates?

I reopened it and made a new comment

@arshaw arshaw closed this as completed Dec 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants