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

Destroyed scheduler still handles events #3212

Closed
jsakalos opened this issue Jul 23, 2021 · 4 comments
Closed

Destroyed scheduler still handles events #3212

jsakalos opened this issue Jul 23, 2021 · 4 comments
Assignees
Labels
bug Something isn't working forum Issues from forum frameworks high-priority Urgent to have fixed large-account Reported by large customer OEM OEM customer premium resolved Fixed but not yet released (available in the nightly builds)
Milestone

Comments

@jsakalos
Copy link

jsakalos commented Jul 23, 2021

The frameworks require to fully remove Bryntum widgets, including installed global listeners, is some cases, for example when navigation out of the page that contains a Bryntum component.

We need a way how to sense that all widgets are gone and detach the global events in that case.

This can also be done in the framework application but we should not impose this responsibility on the users.

The issue can be reproduced as follows:

  1. unzip the attached code simple.zip
  2. run npm i && npm start
  3. navigate to http://localhost:3000
  4. follow the steps from this screencast:

scheduler-not-destroyed

The scheduler should have been destroyed completely at that point and should not hang the browser in the infinite loop.

Forum post

Hello,
We have a react app where we use Bryntym Scheduler Pro and we also use jqxGrid. The issue we're having is that when we first navigate to a page with the scheduler, then navigate to a page with jqxGrid and try to change the filtering option, it completely freezes. This does not happen if we don't visit a page with Bryntum scheduler first, indicating that it is the cause of the issue.
Changing this causes the tab to freeze:
https://imgur.com/mn5xK8N
Also, using Firefox's performance profiler reveals that the freeze is caused by the Bryntum Scheduler. It attempts to handle some event, even though it's not being rendered:
https://imgur.com/a/hB1O0nK
Clicking on the highlighted line opens up this:
https://imgur.com/a/m9mnJyb
So, how am I supposed to destroy the scheduler instance, so that it doesn't affect other pages that are irrelevant to it?
Note we are using react-router-dom for navigation.

Thank you,

@jsakalos jsakalos added bug Something isn't working forum Issues from forum labels Jul 23, 2021
@matsbryntse matsbryntse added this to the 4.2.3 milestone Jul 25, 2021
@isglass isglass modified the milestones: 4.2.3, 4.2.4, 4.2.5 Aug 5, 2021
@SergeyMaltsev SergeyMaltsev modified the milestones: 4.2.5, 4.2.6 Sep 8, 2021
@matsbryntse matsbryntse modified the milestones: 4.2.6, 4.2.7 Sep 15, 2021
@matsbryntse matsbryntse modified the milestones: 4.2.7, 4.2.8 Oct 3, 2021
@isglass isglass modified the milestones: 4.2.8, 4.3.x Oct 7, 2021
@isglass isglass modified the milestones: 4.3.x, 5.0.x Feb 18, 2022
@SergeyMaltsev SergeyMaltsev modified the milestones: 5.0.x, 5.1.x Jul 21, 2022
@SergeyMaltsev SergeyMaltsev modified the milestones: 5.1.x, 5.2.x Oct 13, 2022
@isglass isglass removed this from the 5.2.x milestone Feb 20, 2023
@chuckn0rris chuckn0rris added OEM OEM customer premium labels Aug 22, 2023
@chuckn0rris
Copy link

@chuckn0rris
Copy link

@pjc2007
Copy link

pjc2007 commented Sep 7, 2023

Hi just wondering if any updates on this, as waiting before I can release (which is becoming due, and I am asked for an update).

Or even a work around, As in one of ,my posts, it appear the problem is the handlers are being added at module loading, which seem to happen at app startup, even though I have mine in an (Angular) lazy loaded module,

createHandler (c:\dev\my-app\node_modules\@bryntum\scheduler\scheduler.module.js:11093)
addElementListener (c:\dev\my-app\node_modules\@bryntum\scheduler\scheduler.module.js:10990)
on (c:\dev\my-app\node_modules\@bryntum\scheduler\scheduler.module.js:10960)
4296 (c:\dev\my-app\node_modules\@bryntum\scheduler\scheduler.module.js:11387)
__webpack_require__ (webpack/bootstrap:19)
332 (localhost꞉8100/main.js:1415)
__webpack_require__ (webpack/bootstrap:19)
16823 (localhost꞉8100/main.js:7908)
__webpack_require__ (webpack/bootstrap:19)

@matsbryntse matsbryntse added the high-priority Urgent to have fixed label Sep 20, 2023
@matsbryntse
Copy link
Member

We can check if any Bryntum widgets are present and skip all processing if not.

Will try to get this done soon!

@isglass isglass self-assigned this Sep 20, 2023
@matsbryntse matsbryntse added the ready for review Issue is fixed, the pull request is being reviewed label Sep 20, 2023
@isglass isglass added this to the 5.6.0-beta-2 milestone Sep 22, 2023
@isglass isglass added resolved Fixed but not yet released (available in the nightly builds) and removed ready for review Issue is fixed, the pull request is being reviewed labels Sep 22, 2023
@SergeyMaltsev SergeyMaltsev modified the milestones: 5.6.0-beta-2, 5.6.0 Oct 26, 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 frameworks high-priority Urgent to have fixed large-account Reported by large customer OEM OEM customer premium resolved Fixed but not yet released (available in the nightly builds)
Projects
None yet
Development

No branches or pull requests

6 participants