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

If visibleDate is set multiple times before paint, Scheduler goes into infinite loop #8071

Closed
ghulamghousdev opened this issue Dec 14, 2023 · 1 comment
Assignees
Labels
bug Something isn't working forum Issues from forum high-priority Urgent to have fixed resolved Fixed but not yet released (available in the nightly builds)
Milestone

Comments

@ghulamghousdev
Copy link
Member

ghulamghousdev commented Dec 14, 2023

Forum post

Hi, we are using the Calendar + Scheduler integration and we're currently experiencing a nasty bug that leads to a crash.

Steps to reproduce:

  1. use the default demo (https://bryntum.com/products/calendar/examples/calendar-scheduler/)
  2. Set the following config:
mode: "month"

and

date: new Date()
  1. click on an event that's not in the current week; then click on the Timeline button.

Screen recording: https://www.dropbox.com/scl/fi/j27gd59nbujw77oytmslc/bryntum-freeze.mov?rlkey=i0avtppy125gekg20fpwknhhu&dl=0

Using Calendar 5.6.3.

bryntum-freeze-2.mov
@ghulamghousdev ghulamghousdev added bug Something isn't working forum Issues from forum labels Dec 14, 2023
@matsbryntse matsbryntse added the high-priority Urgent to have fixed label Dec 14, 2023
@mazzafabio mazzafabio self-assigned this Dec 15, 2023
@ExtAnimal ExtAnimal changed the title Changing date to not in current week, prior to switching to Timeline crashes page in calendar If visibleDate is set multiple times before paint, Scheduler goes into infinite loop Dec 15, 2023
@ExtAnimal
Copy link

ExtAnimal commented Dec 15, 2023

TimelineBase.js needs

    updateVisibleDate(options) {
        const me = this;

        // Infinite scroll initialization takes care of its visibleDate after
        // calculating the optimum scroll range in TimelineScroll#initScroll
        if (!(me.infiniteScroll && me.isConfiguring)) {
            if (me.isPainted) {
                me.scrollToDate(options.date, options);
            }
            else if (!me.visibleDateProcessed) {
                me.whenVisible(() => me.updateVisibleDate(me.visibleDate));
                me.visibleDateProcessed = true;
            }
        }
    }

@mazzafabio mazzafabio added in progress ready for review Issue is fixed, the pull request is being reviewed labels Dec 15, 2023
@ExtAnimal ExtAnimal assigned bmblb and unassigned mazzafabio Dec 15, 2023
@ExtAnimal ExtAnimal added this to the 5.6.4 milestone Dec 15, 2023
@bmblb bmblb added resolved Fixed but not yet released (available in the nightly builds) and removed in progress ready for review Issue is fixed, the pull request is being reviewed labels Dec 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working forum Issues from forum high-priority Urgent to have fixed resolved Fixed but not yet released (available in the nightly builds)
Projects
None yet
Development

No branches or pull requests

5 participants