Components: <mat-slider> disable value change on click rage line

Created on 19 Mar 2019  路  5Comments  路  Source: angular/components

Please describe the feature you would like to request.

  • we need to one property using this we can control the range value change or not on click or touch on <mat-slider> line.

What is the use-case or motivation for this proposal?

I use material angular in my website its work good but when I use in a mobile device I face a problem like when I scroll down that time I touch by mistake on mat range slider reason for that my rage was change if I not want

So I want a solution for that like I need only mat-slider value will change when user drag handle of mat-slider instead of clicking slider.

Is there anything else we should know?

https://stackoverflow.com/questions/55205407/mat-slider-touch-issue-in-mobile-device

P5 materiaslider feature needs discussion

Most helpful comment

The change event is fired twice. See https://github.com/angular/material2/issues/14363 It's a bug.
If you click on the "range line" the event should also be fired only once. Only on pointer (mouse / touch) up. But your request to disable click on range-line is good. In other words: Only allow slider-thumb interaction.

All 5 comments

The change event is fired twice. See https://github.com/angular/material2/issues/14363 It's a bug.
If you click on the "range line" the event should also be fired only once. Only on pointer (mouse / touch) up. But your request to disable click on range-line is good. In other words: Only allow slider-thumb interaction.

The change event is fired twice. See #14363 It's a bug.
If you click on the "range line" the event should also be fired only once. Only on pointer (mouse / touch) up. But your request to disable click on range-line is good. In other words: Only allow slider-thumb interaction.

Yes, that's really good.

@jelbourn This is important for the community because in the mobile device when we scroll that time changed the value of the range slider if we don't want

Agree that this is an important request. We have the same issue with phone interactions. Users set the value of the slider by mistake while swiping vertically to scroll the form.

Any idea of a work around or if the Angular team will give us an API to do accomplish this?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Miiekeee picture Miiekeee  路  3Comments

3mp3ri0r picture 3mp3ri0r  路  3Comments

constantinlucian picture constantinlucian  路  3Comments

theunreal picture theunreal  路  3Comments

xtianus79 picture xtianus79  路  3Comments