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

SimpleBar not functional inside initially hidden element (regression from 4.2.3) #406

Closed
andersk opened this issue Nov 9, 2019 · 3 comments

Comments

@andersk
Copy link
Contributor

andersk commented Nov 9, 2019

Describe the bug
In SimpleBar 4.3.0-alpha.1 and later, if you initialize a SimpleBar on something inside a <div hidden> container, and then later show the container, the SimpleBar is not functional (the scrollbar doesn’t show and you can’t scroll with the scroll wheel) until you force a recalculation by resizing it. This is a regression from SimpleBar 4.2.3, where it worked correctly.

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://jsfiddle.net/anderskaseorg/9f2zmhtq/
  2. Click on the Show button.
  3. Attempt to scroll the SimpleBar.

Expected behavior
SimpleBar should work.

Reproducible example
https://jsfiddle.net/anderskaseorg/9f2zmhtq/

Additional context
Add any other context about the problem here.

Your environment

Software Version(s)
SimpleBar 5.0.6
Browser Firefox 70.0.1
npm/Yarn N/A
Operating System Ubuntu 20.04
@NechiK
Copy link

NechiK commented Nov 11, 2019

Yes, I faced this issue as well. I updated simplebar to fix issue with initial loading and got another issue with hidden elements :(

andersk added a commit to andersk/zulip that referenced this issue Nov 11, 2019
Keep handlebars at 4.2.x because
handlebars-lang/handlebars.js#1598 breaks our test
suite, and simplebar at 4.2.x because of
Grsmto/simplebar#406.  Upgrade everything
else.

Signed-off-by: Anders Kaseorg <[email protected]>
timabbott pushed a commit to zulip/zulip that referenced this issue Nov 12, 2019
Keep handlebars at 4.2.x because
handlebars-lang/handlebars.js#1598 breaks our test
suite, and simplebar at 4.2.x because of
Grsmto/simplebar#406.  Upgrade everything
else.

Signed-off-by: Anders Kaseorg <[email protected]>
@arrancardnell
Copy link

I am facing a similar issue with a SimpleBar inside some Bootstrap 3 tabs, except that the entire contents of the tab (not just the scrollbar) remains hidden. It can be fixed by either resizing the page or switching back and forth between the tabs.

@Grsmto Grsmto closed this as completed in c73be96 Nov 13, 2019
@Grsmto
Copy link
Owner

Grsmto commented Nov 13, 2019

Fixed in [email protected]. Let me know if any issue.

YashRE42 pushed a commit to YashRE42/zulip that referenced this issue Dec 12, 2019
Keep handlebars at 4.2.x because
handlebars-lang/handlebars.js#1598 breaks our test
suite, and simplebar at 4.2.x because of
Grsmto/simplebar#406.  Upgrade everything
else.

Signed-off-by: Anders Kaseorg <[email protected]>
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

4 participants