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

Destroying a focused vis-timeline with clickToUse breaks other timelines #257

Closed
fodpeter opened this issue Jan 17, 2020 · 0 comments
Closed
Labels
bug Something isn't working

Comments

@fodpeter
Copy link
Contributor

I have 2 timelines with clickToUse option. After the focused one is destroyed, I cannot interact with other timelines anymore.

Expected: I can focus other timelines and use them further.
Actual: Error in the console and other timelines are not focusable, zoomable.

Activator.js:126 Uncaught TypeError: Cannot read property 'unbind' of null
    at yD.deactivate (Activator.js:126)
    at yD.activate (Activator.js:102)
    at yD._onTapOverlay (Activator.js:139)

Reproduction:
https://jsbin.com/soyuqeg/edit?html,output

Component: vis-timeline
OS: Linux
Browser: Chrome

Other info:
I think this bug is caused by the Activator.js, that tries to deactivate the Activator instance in the current static field, but that instance was already destroyed (keycharm was set to null).
https://github.com/visjs/vis-timeline/blob/master/lib/shared/Activator.js#L126

@yotamberk yotamberk added the bug Something isn't working label Jan 18, 2020
fodpeter added a commit to fodpeter/vis-timeline that referenced this issue Jan 20, 2020
Cleanup activator.current reference on deactivate.
Add test for activator.
yotamberk pushed a commit that referenced this issue Jan 21, 2020
Cleanup activator.current reference on deactivate.
Add test for activator.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants