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

Dynamic drawing error for horizontal scroll #377

Closed
anilcan-kara opened this issue Oct 1, 2019 · 4 comments
Closed

Dynamic drawing error for horizontal scroll #377

anilcan-kara opened this issue Oct 1, 2019 · 4 comments

Comments

@anilcan-kara
Copy link

Thx for simplebar, its awesome.

But, it isn't re-generating horizontal scroll for dynamically updated childs.

It working vertical scroll.
And it working horizontal scroll on re-appeared containers. (jQuery hide() and after show())

https://jsfiddle.net/wpkuht18/

@Grsmto
Copy link
Owner

Grsmto commented Oct 1, 2019

Thank you very much for the reproducible example, that will help a lot to fix this! I'll look into it.

@Grsmto
Copy link
Owner

Grsmto commented Oct 9, 2019

This will be fixed in the new major version. As this required a big change I preferred to defer it to a major release (simplebar@5.0.0).

@anilcan-kara
Copy link
Author

Thank you so much, now its working with created elements,

But, :(

Its not working with (style changed) appeared elements.

:D https://jsfiddle.net/zfw0odxs/

@Grsmto
Copy link
Owner

Grsmto commented Oct 10, 2019

Yes I'm aware of that, it's a limitation, we can't detect style changes and horizontal overflow does not trigger a resize, so there is no way for SimpleBar to recalculate when this happen. :(
The only way would be to have an interval checking for size but we want to avoid that.
That's one of the few cases where you will want to call the recalculate function manually.

@Grsmto Grsmto closed this as completed Jan 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants