mirror of
https://github.com/Novaloop-AG/healthchat-web.git
synced 2026-11-10 09:15:16 +00: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:
@@ -102,6 +102,9 @@ module.exports = React.createClass({
|
||||
|
||||
/* is this the focussed event */
|
||||
isSelectedEvent: React.PropTypes.bool,
|
||||
|
||||
/* callback called when images in events are loaded */
|
||||
onImageLoad: React.PropTypes.func,
|
||||
},
|
||||
|
||||
getInitialState: function() {
|
||||
@@ -323,7 +326,8 @@ module.exports = React.createClass({
|
||||
{ sender }
|
||||
<div className="mx_EventTile_line">
|
||||
<EventTileType mxEvent={this.props.mxEvent} highlights={this.props.highlights}
|
||||
highlightLink={this.props.highlightLink}/>
|
||||
highlightLink={this.props.highlightLink}
|
||||
onImageLoad={this.props.onImageLoad} />
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user