Skip to content

Commit

Permalink
beta changes (please use 1.2 version)
Browse files Browse the repository at this point in the history
  • Loading branch information
kamlekar committed Dec 7, 2015
1 parent 84807b9 commit 51e2fd7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions slimscroll.js
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ var slimScroll = function(C, payload){
setAttr(i[s], 'data-scrollbar', '1');
assignValues();

var scrollBarWidth = C.offsetWidth - i[w].offsetWidth;
var scrollBarWidth = C.offsetWidth + C.offsetLeft - (i[S].offsetParent.offsetLeft + i[S].offsetLeft);
// Stretching the inner container so that the default scrollbar is completely invisible
if(Math.abs(scrollBarWidth) < 5){
// Seems scrollbar isn't taking width.
Expand All @@ -206,7 +206,7 @@ var slimScroll = function(C, payload){
return false;
}
else{
i[w].style.right = scrollBarWidth + "px";
i[w].style.right = -scrollBarWidth + "px";
}
if(payload.keepFocus){
setAttr(i[w], 'tabindex', '-1');
Expand Down

0 comments on commit 51e2fd7

Please sign in to comment.