vendor/assets/javascripts/foundation/foundation.slider.js in foundation-rails-5.3.0.1 vs vendor/assets/javascripts/foundation/foundation.slider.js in foundation-rails-5.3.1.0

- old
+ new

@@ -2,11 +2,11 @@ 'use strict'; Foundation.libs.slider = { name : 'slider', - version : '5.3.0', + version : '5.3.1', settings: { start: 0, end: 100, step: 1, @@ -38,13 +38,18 @@ }) .on('mousemove.fndtn.slider touchmove.fndtn.slider pointermove.fndtn.slider', function(e) { if (!!self.cache.active) { e.preventDefault(); if ($.data(self.cache.active[0], 'settings').vertical) { - self.calculate_position(self.cache.active, e.pageY || - e.originalEvent.clientY || - e.originalEvent.touches[0].clientY || - e.currentPoint.y); + var scroll_offset = 0; + if (!e.pageY) { + scroll_offset = window.scrollY; + } + self.calculate_position(self.cache.active, (e.pageY || + e.originalEvent.clientY || + e.originalEvent.touches[0].clientY || + e.currentPoint.y) + + scroll_offset); } else { self.calculate_position(self.cache.active, e.pageX || e.originalEvent.clientX || e.originalEvent.touches[0].clientX || e.currentPoint.x);