fix(js): consider 0 value for `pageX`, `pageY`
* remove error message `Uncaught TypeError: Cannot read property '0' of undefined` if mouse position X/Y is 0 * add `get_cursor_position(e, xy)` method If you start dragging the slider and move the mouse position X/Y until it is `0`, it is counted as falsey which means `||` in [line 49](https://github.com/zurb/foundation/blob/master/js/foundation/foundat ion.slider.js#L49) and in [line 55](https://github.com/zurb/foundation/blob/master/js/foundation/foundat ion.slider.js#L55) keeps going until it gets to `e.originalEvent.touches[0].clientX/Y` where it raises an error if it is no touch device. I changed it to explicitly checking that the values are `undefined`.
Loading
Please sign in to comment