diff --git a/src/components/views/elements/TintableSvg.js b/src/components/views/elements/TintableSvg.js index f7273fb4b3..e8be5f3415 100644 --- a/src/components/views/elements/TintableSvg.js +++ b/src/components/views/elements/TintableSvg.js @@ -43,14 +43,10 @@ var TintableSvg = React.createClass({ componentDidMount: function() { this.id = TintableSvg.idSequence++; TintableSvg.mounts[this.id] = this; - // we can't use onLoad on object due to https://github.com/facebook/react/pull/5781 - // so handle it with pure DOM instead - ReactDOM.findDOMNode(this).addEventListener('load', this.onLoad); }, componentWillUnmount: function() { delete TintableSvg.mounts[this.id]; - ReactDOM.findDOMNode(this).removeEventListener('load', this.onLoad); }, tint: function() { @@ -71,9 +67,11 @@ var TintableSvg = React.createClass({ type="image/svg+xml" data={ this.props.src } width={ this.props.width } - height={ this.props.height }/> + height={ this.props.height } + onLoad={ this.onLoad } + /> ); } }); -module.exports = TintableSvg; \ No newline at end of file +module.exports = TintableSvg;