You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-07-15 11:01:52 +03:00
Update the scroll offset when images load
In order to deal with image-loading reshaping the DOM, wire up ScrollPanel.checkScroll to the image load events. Fixes https://github.com/vector-im/vector-web/issues/984
This commit is contained in:
@ -37,6 +37,9 @@ module.exports = React.createClass({
|
||||
|
||||
/* link URL for the highlights */
|
||||
highlightLink: React.PropTypes.string,
|
||||
|
||||
/* callback called when images in events are loaded */
|
||||
onImageLoad: React.PropTypes.func,
|
||||
},
|
||||
|
||||
|
||||
@ -60,6 +63,7 @@ module.exports = React.createClass({
|
||||
}
|
||||
|
||||
return <TileType mxEvent={this.props.mxEvent} highlights={this.props.highlights}
|
||||
highlightLink={this.props.highlightLink} />;
|
||||
highlightLink={this.props.highlightLink}
|
||||
onImageLoad={this.props.onImageLoad} />;
|
||||
},
|
||||
});
|
||||
|
Reference in New Issue
Block a user