Skip to content

Commit

Permalink
Merge pull request #1451 from KapJI/slider-fix
Browse files Browse the repository at this point in the history
Fix Slider issue #1448
  • Loading branch information
Hai Nguyen committed Aug 21, 2015
2 parents 5a2de1a + 1474688 commit ed7e830
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion src/ripples/focus-ripple.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,13 @@ const FocusRipple = React.createClass({
const width = el.offsetWidth;
const size = Math.max(height, width);

let oldTop = 0;
// For browsers that don't support endsWith()
if (el.style.top.indexOf('px', el.style.top.length - 2) !== -1) {
oldTop = parseInt(el.style.top);
}
el.style.height = size + 'px';
el.style.top = (size / 2 * -1) + (height / 2) + 'px';
el.style.top = (height / 2) - (size / 2 ) + oldTop + 'px';
},

});
Expand Down
2 changes: 1 addition & 1 deletion src/slider.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ let Slider = React.createClass({
this.props.disabled && styles.handleWhenDisabled
);

let rippleStyle = {height: '12px', width: '12px'};
let rippleStyle = {height: '12px', width: '12px', overflow: 'visible'};

if ((this.state.hovered || this.state.focused) && !this.props.disabled) {
remainingStyles.backgroundColor = this.getTheme().trackColorSelected;
Expand Down

0 comments on commit ed7e830

Please sign in to comment.