jScroll icon indicating copy to clipboard operation
jScroll copied to clipboard

Scroll goes negative on margin

Open apedretti opened this issue 10 years ago • 0 comments

When the parent doesn't have the height set (which with floating elements could happen), or when the height of the parent is smaller than the moving elem, the plugin comes with a negative margin.

To solve this, add this validation on the "getMargin" closure (line 63 on my version): if(max < this.originalMargin) max = this.originalMargin;

apedretti avatar Jul 19 '14 16:07 apedretti