How to cancel a click event on the parent when you mousedown on a child?

There are audio.
When you click on it starts playing music.
Element's audio is the volume slider. When you mousedown and then mousemove move the slider and increase/decrease the volume.
If during dragging the slider, the mouse cursor to translate the item itself audio happening events of the wedge on it. How to solve this problem?

Think of ideas just to keep in memory that moves, and when you click on the audio to check this movement. Maybe you can do something at the level of the surfacing of events to solve it?
July 12th 19 at 16:41

Find more questions by tags JavaScript