From 55dd6da015ff2f46b2ca24d28242dc4ff35c1129 Mon Sep 17 00:00:00 2001 From: Adrien Grsmto Date: Sun, 16 Apr 2017 12:55:14 -0300 Subject: [PATCH] fix scrollbar being visible on IE11 --- src/simplebar.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/simplebar.js b/src/simplebar.js index 9ba5a20c..b2239dff 100755 --- a/src/simplebar.js +++ b/src/simplebar.js @@ -25,7 +25,7 @@ export default class SimpleBar { this.options = Object.assign({}, SimpleBar.defaultOptions, options); this.classNames = this.options.classNames; this.scrollbarWidth = scrollbarWidth(); - this.offsetSize = 15; + this.offsetSize = 20; // If scrollbar is a floating scrollbar, disable the plugin this.enabled = this.scrollbarWidth !== 0 || this.options.forceEnabled; @@ -168,8 +168,8 @@ export default class SimpleBar { this.contentEl.style.paddingBottom = `${this.offsetSize}px`; if (this.enabled && this.scrollbarWidth !== 0) { - this.scrollContentEl.style.marginBottom = `-${this.offsetSize*2}px`; - this.contentEl.style.marginRight = `-${this.offsetSize}px`; + this.scrollContentEl.style.marginBottom = `-${this.scrollbarWidth*2}px`; + this.contentEl.style.marginRight = `-${this.scrollbarWidth}px`; } // Calculate content size