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

Error in grid plugin when re-initialising fancytree after destroying #1045

Closed
sophanox opened this issue Nov 2, 2020 · 3 comments
Closed
Labels
bug ext-grid (Unsupported experimental plugin)

Comments

@sophanox
Copy link

sophanox commented Nov 2, 2020

Fiddle here: http://jsfiddle.net/fun67w1c/

As you can see, it makes a grid instance with the plainscrollbar, then destroys it after 5 seconds and recreates.

If you try to scroll then, you'll see it results in an error in 'isViewportBottom' due to visibleNodeList being null. In the example I clear the scrollbar innerHTML and remove its events, but the bug still happens. The bug even happens if the HTML for the scrollbar is replaced entirely.

Not sure what's going on! Is the 'destroy' not clearing off something that pertains to the grid properly?

Thanks!

@mar10 mar10 added the ext-grid (Unsupported experimental plugin) label Nov 5, 2020
@mar10
Copy link
Owner

mar10 commented Nov 5, 2020

Does tree.redrawViewport(true) help?

@sophanox
Copy link
Author

sophanox commented Nov 5, 2020

Gives me the same error unfortunately.

@mar10 mar10 added the bug label Dec 20, 2020
@mar10
Copy link
Owner

mar10 commented Dec 20, 2020

The destroy function did not unregister the 'wheel' handler callback, which still referenced the now-dead tree instance.

@mar10 mar10 closed this as completed in 18d72a1 Dec 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug ext-grid (Unsupported experimental plugin)
Projects
None yet
Development

No branches or pull requests

2 participants