material icon indicating copy to clipboard operation
material copied to clipboard

slider: rendering not updating when using ng-model-options

Open AxxlForce opened this issue 10 years ago • 7 comments

I'm using "ng-model-options" in order to get notified, when the user stops interacting with the slider. As soon as I define the "ng-model-options" the rendering no longer works when dragging the slider:

http://codepen.io/anon/pen/epqrNK

AxxlForce avatar Nov 30 '15 15:11 AxxlForce

the problem explicitly occurs when using "updateOn" within "ng-model-options"

AxxlForce avatar Nov 30 '15 15:11 AxxlForce

+1, also stutters with debounce

Rouby avatar Dec 23 '15 13:12 Rouby

@AxxlForce @Rouby works fine for me codepen

EladBezalel avatar Jan 14 '16 11:01 EladBezalel

@EladBezalel how is that working correctly? the slider doesn't move smoothly at all.

jlacroix12 avatar Apr 04 '17 00:04 jlacroix12

@EladBezalel This bug should not be closed: drag doesn't work in either Firefox nor Chrome in the given example.

eino avatar Jan 30 '18 15:01 eino

There do appear to be some issues here. I created a CodePen with AngularJS 1.6.7 and 1.1.6 that better demonstrates the expectations (slider0) and the issues (slider1, slider2).

Splaktar avatar Feb 02 '18 08:02 Splaktar

Perhaps a bit late, but I found this while looking for a very similar issue, and I think the root causes may be related. A few places in SliderDirective call ngModel.$viewValue = something instead of the (newer?) function ngModel.$setViewValue(), which explicitly handles updateOn behavior. Will try to do a PR, and hopefully one for this issue as well.

sviams avatar Nov 21 '19 07:11 sviams