prajwalkman / angular-slider

(DEPRECATED) Slider directive implementation for AngularJS, without jQuery dependencies
http://prajwalkman.github.io/angular-slider
MIT License
249 stars 177 forks source link

Wrong pointer //range #31

Open ekallaur opened 10 years ago

ekallaur commented 10 years ago

Steps to reproduce.

  1. set max pointer to maximum value
  2. set low pointer to maximum value
  3. move one slider to lower value.
  4. Moving max pointer occurs moving of low poniter

Checked only in Chrome.Version 29.0.1547.76 m

smajl commented 10 years ago

Confirmed on FF 24.0. You can reproduce this easily right on the demo page. Makes this module unusable in production. :/

I just noticed, that the module enables to swap sliders (low becomes high and vice versa), imho the problem lies in that part of algorithm. Also when you drag one slider over another with quick motion, the second one changes value deliberately (another bug).

justin-edwards commented 10 years ago

@smajl - to make this usable in production, I modified it to disallow the pointers from passing each other:

https://github.com/Gigmasters/angular-slider/commit/a9427d5663877b9fe76f4edc6156686da869c31a

smajl commented 10 years ago

@justin-edwards Great. Would be great to have this configurable via directive attribute. :) Also demo page should be updated then. Thanks for your effort.

justin-edwards commented 10 years ago

@smajl Good thought, I'll make a note to get around to that. Just so you know, that fork has some slightly hacky stuff being done to it so we can get stuff out the door. For instance, my coworker @abona just added in an event listener so you can broadcast an event to force it to run it's updatedom event.

This is our 'just get it done' solution to the issue of the slider improperly positioning pointers if the slider is display:none when it's initialized.

Anyway, like I said I'll make a note to tweak it and update the docs.