baron icon indicating copy to clipboard operation
baron copied to clipboard

Content dimensions depending on `barOnCls`

Open andreyvolokitin opened this issue 4 years ago • 1 comments

I make a gap/padding in the content (using additional inner wrapper for that as suggested here) to accommodate scrollbars, but only if they are present (barOnCls is added), so in my css I add padding depending on presence of barOnCls. But after initialization the clipper height is set without this padding taken into account. I suspect (but not 100% sure yet), this is because content dimensions are read while this padding is not yet applied (barOnCls is added after dimensions are read)

What should be a proper solution for this: modifying the code so that dimensions a read after barOnCls is applied, or the gap for scrollbars should be added by different means (i.e. on the outer clipper element, because obviously scroller element can't take any padding)?

P.S.: I see this specifically with horizontal scrolling, not sure if it affects vertical scrolling as well, but I think it might not make any problem there

andreyvolokitin avatar Mar 22 '20 11:03 andreyvolokitin

Yep, clipper can't have padding either because of OS X FF.

andreyvolokitin avatar Mar 22 '20 12:03 andreyvolokitin