From a0755b76018d65cb5ae1eb640d4474edfa9aa260 Mon Sep 17 00:00:00 2001 From: Johnny Shields Date: Sun, 11 May 2014 16:12:02 +0900 Subject: [PATCH] Fix for Chrome/MacOS X --- antiscroll.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/antiscroll.js b/antiscroll.js index 2de1812..c0c5052 100644 --- a/antiscroll.js +++ b/antiscroll.js @@ -37,10 +37,13 @@ this.autoHide = false !== this.options.autoHide; this.padding = undefined == this.options.padding ? 2 : this.options.padding; + var width = this.inner.parent().width(); + var height = this.inner.parent().height(); + this.inner = this.el.find('.antiscroll-inner'); this.inner.css({ - 'width': '+=' + (this.y ? scrollbarSize() : 0) - , 'height': '+=' + (this.x ? scrollbarSize() : 0) + 'width': (this.y ? width + scrollbarSize() : 0) + , 'height': (this.x ? height + scrollbarSize() : 0) }); this.refresh();