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-placeholder is increasing width infinitely in Mobile #242

Closed
ZerglingGo opened this issue Nov 29, 2018 · 9 comments
Closed

simplebar-placeholder is increasing width infinitely in Mobile #242

ZerglingGo opened this issue Nov 29, 2018 · 9 comments

Comments

@ZerglingGo
Copy link

Current Behavior

When I loading pages in Mobile environment(Same affected in responsive mode at Developer tools), .simplebar-placeholder width is increasing infinitely.

2018-11-29_16-05-29

Reproducible example

I couldn't reproduce this behavior.
Current simplebar layouts:
chrome_2018-11-29_16-18-07

There has two simplebar elements Each is wrapped in a flex wrapper, and flex is set to 1 1 50%. and Inside has table.
Here is a simple summary:
div(display: flex) > section(flex: 1 1 50%)*2 > div(data-simplebar) > table(width: 100%)

Additional context

image
image

This is recorded function calling. which is repeating a pattern similar to the above.

Your environment

Software Version(s)
SimpleBar 3.1.0
Browser Google Chrome 70
npm/Yarn None
Operating System Windows 10, Android
@Grsmto
Copy link
Owner

Grsmto commented Dec 1, 2018

Hi,
thanks for this report.
It comes from the nature of the flex-basis property that works differently from width/height. In the meanwhile you can probably work around this issue by applying overflow: hidden to the data-simplebar element or just use width instead of flex-basis

@Grsmto
Copy link
Owner

Grsmto commented Dec 6, 2018

I had a deeper look at this and the solution is not an easy one.
It's definitely fixable but it involves quite some code so I will wait for now for more reports. If this is really blocking (as in, the workaround I proposed can't solve that), I will try to get a fix built-in.

@ZerglingGo
Copy link
Author

Thank you.
I am currently using a temporary method to use width instead of flex-basis

@Poloten
Copy link

Poloten commented Dec 26, 2018

I have the same bug with infinite 'width', when I used

<section style="display: flex">
<input style="width:100%"></select>
</section>
<section style="display: flex">
<textarea style="width:100%"></textarea>
</section>

Infinite width appears only in the mobile view (when the user-agent changes for mobile devices) and in MacOs browsers. I see errors in the console "resizeobserver loop limit exceeded".
Also simplebar calculates the wrong height of that and i can't scroll to the end. It reproduce only in mobile view. And I don't know how to fix second bug :(

@Grsmto
Copy link
Owner

Grsmto commented Apr 12, 2019

Guys, I just released simplebar@4.0.0-alpha.0 that would be awesome if you could let me know if this is still happening with the new version.
Thanks for your contribution!

@ZerglingGo
Copy link
Author

I have trying with simplebar@4.0.0-alpha.0, but problem is still continuing.

@Grsmto
Copy link
Owner

Grsmto commented Apr 12, 2019

Ok thanks. It happens only when the scrollbar is floating. Got it.
I'll look into it.

@Grsmto
Copy link
Owner

Grsmto commented Apr 12, 2019

I'm releasing simplebar@4.0.0-alpha.1 in a few min. Let me know how it's going.

@ZerglingGo
Copy link
Author

All right, now the problem is solved.
Thank you for your wonderful project and hard work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants