seiyria / bootstrap-slider

A slider control for Bootstrap 3 & 4.
http://seiyria.github.io/bootstrap-slider/
Other
3k stars 1.14k forks source link

Hovering over ticks displays the tick index #884

Closed jespirit closed 5 years ago

jespirit commented 5 years ago

I also noticed this while working on Issue #882

I should also add that the tooltip does not move over the tick, it stays in the same place.

https://github.com/seiyria/bootstrap-slider/blob/59745c648eb9a4e937783c7177521219212112ab/src/js/bootstrap-slider.js#L1176-L1177

https://github.com/seiyria/bootstrap-slider/blob/59745c648eb9a4e937783c7177521219212112ab/src/js/bootstrap-slider.js#L1172-L1184

You can follow the steps below, and you'll notice the value of tooltip is the index of the tick.

  1. Open a console
  2. Move the handle to the middle (value of 5).
  3. Hover over the rightmost tick once. Should display hover: 5
  4. Repeat step 3 multiple times. Should display hover: 2

Note: Also try hovering over the leftmost tick.

console.log('hover:', mySlider.getValue());

https://jsfiddle.net/xq0cgoa5/

Issues

NOTE: Before filing a new issue, please search through the open issues list and check to see if an existing issue already exists that describes your problem. If so, leave a comment within that issue with the checklist items described below.

Please make sure you include the following in your issue report where appropriate: