Commit 61dd6dcc authored by André Ruffert's avatar André Ruffert
Browse files

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`.
parent e24d36b2
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment