File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -329,11 +329,9 @@ export default class SimpleBar {
329
329
this . elStyles = elWindow . getComputedStyle ( this . el ) ;
330
330
this . isRtl = this . elStyles . direction === 'rtl' ;
331
331
332
- const contentElOffsetWidth = this . contentEl . offsetWidth ;
333
-
334
332
const isHeightAuto = this . heightAutoObserverEl . offsetHeight <= 1 ;
335
- const isWidthAuto =
336
- this . heightAutoObserverEl . offsetWidth <= 1 || contentElOffsetWidth > 0 ;
333
+ const isWidthAuto = this . heightAutoObserverEl . offsetWidth <= 1 ;
334
+ const contentElOffsetWidth = this . contentEl . offsetWidth ;
337
335
338
336
const contentWrapperElOffsetWidth = this . contentWrapperEl . offsetWidth ;
339
337
@@ -350,14 +348,13 @@ export default class SimpleBar {
350
348
351
349
// Determine placeholder size
352
350
this . placeholderEl . style . width = isWidthAuto
353
- ? `${ contentElOffsetWidth || contentElScrollWidth } px`
351
+ ? `${ contentElOffsetWidth } px`
354
352
: 'auto' ;
355
353
this . placeholderEl . style . height = `${ contentElScrollHeight } px` ;
356
354
357
355
const contentWrapperElOffsetHeight = this . contentWrapperEl . offsetHeight ;
358
356
359
- this . axis . x . isOverflowing =
360
- contentElOffsetWidth !== 0 && contentElScrollWidth > contentElOffsetWidth ;
357
+ this . axis . x . isOverflowing = contentElScrollWidth > contentElOffsetWidth ;
361
358
this . axis . y . isOverflowing =
362
359
contentElScrollHeight > contentWrapperElOffsetHeight ;
363
360
You can’t perform that action at this time.
0 commit comments