Fix the formula between scroll position and scrollbar position.

With @Mordhak's suggestion, fixed the formula to calculate the values.
This patch will resolve the scroll position problem when the
minScrollbarLength setting is applied.