simplebar-placeholder is increasing width infinitely in Mobile

Created on 29 Nov 2018  路  9Comments  路  Source: Grsmto/simplebar

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

bug enhancement

All 9 comments

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

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.

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

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 :(

Guys, I just released [email protected] that would be awesome if you could let me know if this is still happening with the new version.
Thanks for your contribution!

I have trying with [email protected], but problem is still continuing.

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

I'm releasing [email protected] in a few min. Let me know how it's going.

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

JoshClose picture JoshClose  路  7Comments

luky1984 picture luky1984  路  5Comments

ghost picture ghost  路  4Comments

Aleksandr2015 picture Aleksandr2015  路  6Comments

EmilMoe picture EmilMoe  路  4Comments