Skip to content

Commit

Permalink
Make the touch area smaller to conserve previous size
Browse files Browse the repository at this point in the history
  • Loading branch information
ValentinH committed Jun 30, 2018
1 parent 6accd15 commit 17e8833
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/material-ui-lab/src/Slider/Slider.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,15 @@ export const style = theme => {
root: {
position: 'relative',
width: '100%',
padding: '20px 0',
padding: '16px 0',
cursor: 'pointer',
WebkitTapHighlightColor: 'transparent',
'&$disabled': {
cursor: 'no-drop',
},
'&$vertical': {
height: '100%',
padding: '0 20px',
padding: '0 16px',
},
'&$reverse': {
transform: 'scaleX(-1)',
Expand Down Expand Up @@ -332,6 +332,7 @@ class Slider extends React.Component {
};

handleTouchStart = event => {
event.preventDefault();
this.setState({ currentState: 'activated' });

this.globalMouseUpListener = addEventListener(document, 'touchend', this.handleMouseUp);
Expand All @@ -342,6 +343,7 @@ class Slider extends React.Component {
};

handleMouseDown = event => {
event.preventDefault();
this.setState({ currentState: 'activated' });

this.globalMouseUpListener = addEventListener(document, 'mouseup', this.handleMouseUp);
Expand Down

0 comments on commit 17e8833

Please sign in to comment.