Skip to content

Commit

Permalink
fix scrollbar being visible on IE11
Browse files Browse the repository at this point in the history
  • Loading branch information
Adrien Grsmto committed Apr 16, 2017
1 parent 5d2d008 commit 55dd6da
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/simplebar.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 55dd6da

Please sign in to comment.