diff --git a/src/perfect-scrollbar.js b/src/perfect-scrollbar.js index 5a397d4..cc882dd 100644 --- a/src/perfect-scrollbar.js +++ b/src/perfect-scrollbar.js @@ -152,8 +152,8 @@ }; var updateBarSizeAndPosition = function () { - containerWidth = settings.includePadding ? $this.outerWidth() : $this.width(); - containerHeight = settings.includePadding ? $this.outerHeight() : $this.height(); + containerWidth = settings.includePadding ? $this.innerWidth() : $this.width(); + containerHeight = settings.includePadding ? $this.innerHeight() : $this.height(); contentWidth = $this.prop('scrollWidth'); contentHeight = $this.prop('scrollHeight');