Skip to content

Commit

Permalink
Fix focus-ripple pulsation in Safari
Browse files Browse the repository at this point in the history
Resolves mui#627.
  • Loading branch information
pomerantsev committed May 9, 2015
1 parent 3e89576 commit 28f4cf5
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/ripples/focus-ripple.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
var React = require('react');
var Modernizr = require('../utils/modernizr.custom');
var StylePropable = require('../mixins/style-propable');
var Transitions = require('../styles/transitions');
var Colors = require('../styles/colors');
Expand Down Expand Up @@ -63,14 +64,14 @@ var FocusRipple = React.createClass({
var startScale = 'scale(0.75)';
var endScale = 'scale(0.85)';
var innerCircle = React.findDOMNode(this.refs.innerCircle);
var currentScale = innerCircle.style.transform;
var currentScale = innerCircle.style[Modernizr.prefixed('transform')];

This comment has been minimized.

Copy link
@hai-cea
var nextScale;

currentScale = currentScale || startScale;
nextScale = currentScale === startScale ?
endScale : startScale;

innerCircle.style.transform = nextScale;
innerCircle.style[Modernizr.prefixed('transform')] = nextScale;
setTimeout(this._pulsate, pulsateDuration);
},

Expand All @@ -86,4 +87,4 @@ var FocusRipple = React.createClass({

});

module.exports = FocusRipple;
module.exports = FocusRipple;

0 comments on commit 28f4cf5

Please sign in to comment.