diff --git a/packages/material-ui-lab/src/Slider/Slider.js b/packages/material-ui-lab/src/Slider/Slider.js index 77a2685d8dfea9..0f7a35edf0722c 100644 --- a/packages/material-ui-lab/src/Slider/Slider.js +++ b/packages/material-ui-lab/src/Slider/Slider.js @@ -459,7 +459,6 @@ class Slider extends React.Component { style={inlineThumbStyles} onBlur={this.handleBlur} onKeyDown={this.handleKeyDown} - onMouseDown={this.handleMouseDown} onTouchStartCapture={this.handleTouchStart} onTouchMove={this.handleMouseMove} onFocusVisible={this.handleFocus} diff --git a/packages/material-ui-lab/src/Slider/Slider.test.js b/packages/material-ui-lab/src/Slider/Slider.test.js index a9be9f44a3932f..c016703f4dc2e2 100644 --- a/packages/material-ui-lab/src/Slider/Slider.test.js +++ b/packages/material-ui-lab/src/Slider/Slider.test.js @@ -44,11 +44,13 @@ describe('', () => { value={0} />, ); - const button = wrapper.find('button'); wrapper.simulate('click'); - button.simulate('mousedown'); - button.simulate('mouseup'); + wrapper.simulate('mousedown'); + // document.simulate('mouseup') + const mouseupEvent = document.createEvent('HTMLEvents'); + mouseupEvent.initEvent('mouseup', false, true); + document.dispatchEvent(mouseupEvent); assert.strictEqual(handleChange.callCount, 1, 'should have called the handleChange cb'); assert.strictEqual(handleDragStart.callCount, 1, 'should have called the handleDragStart cb');