Description
I'm trying to place several mat-sliders next to each other and be able to adjust them with multi-touch.
Problem is that, as soon as I start dragging a second fader, the fader gets the values of the other fader.
Reproduction
Use StackBlitz to reproduce your issue:
Steps to reproduce:
- open application (stackblitz, link see above) on a multi-touch enabled device, e.g. smartphone (I tried with android / chrome and on a multi touch screen on linux /chrome + firefox)
- move first slider by touching it. don't lift the finger
- move the second slider by touching it, also don't lift the finger
Expected Behavior
The value of the slider is adjusted independently
Actual Behavior
The second slider always has the same value as the first slider.
Environment
- Angular: 11.2.11
- CDK/Material: 11.2.11
- Browser(s): Chrome, Firefox
- Operating System (e.g. Windows, macOS, Ubuntu): ArchLinux, Android
Investigation
I already figured out why this bug appears and made an attempt to fix it - which seems to work - at least in my use case.
The problem is, that on the touch events, there is no distinction if the event is for this particular fader or not.
With my PR, I'm adding a filter before those events and only choose the targetTouch that is relevant for that fader.
Here is the Pull request (first only against my own fork)
https://github.com/puschkin/components/pull/1