Search code examples
javascripthtmlcssperfect-scrollbar

Infinite drag perfect-scrollbar issue in Firefox


I came across a unique situation while applying perfect-scrollbar to a container whose height is applied dynamically.

The scroll goes down the container even after reaching the end and while wheelPropagation set to false.

JsFiddle Link

Note: This issue can be reproduced only in Firefox browser. It works perfectly in Chrome.


Solution

  • The issue occurs if the 'Dynamic height' calculated has some decimal points in the px value. Eg: 250.65px

    Round off the value to the nearest integer and the issue won't occur in Firefox browser.

    The original issue -> JsFiddle

    The fixed one -> JsFiddle