mirror of
https://github.com/element-hq/element-web
synced 2024-11-26 11:15:53 +03:00
Merge pull request #594 from matrix-org/luke/fix-scroll-jump-on-video-decryption
Fix scroll jumping when a video is decrypted
This commit is contained in:
commit
a014dcc2d0
1 changed files with 9 additions and 0 deletions
|
@ -27,6 +27,14 @@ import q from 'q';
|
|||
module.exports = React.createClass({
|
||||
displayName: 'MVideoBody',
|
||||
|
||||
propTypes: {
|
||||
/* the MatrixEvent to show */
|
||||
mxEvent: React.PropTypes.object.isRequired,
|
||||
|
||||
/* called when the video has loaded */
|
||||
onWidgetLoad: React.PropTypes.func.isRequired,
|
||||
},
|
||||
|
||||
getInitialState: function() {
|
||||
return {
|
||||
decryptedUrl: null,
|
||||
|
@ -100,6 +108,7 @@ module.exports = React.createClass({
|
|||
decryptedThumbnailUrl: thumbnailUrl,
|
||||
decryptedBlob: decryptedBlob,
|
||||
});
|
||||
this.props.onWidgetLoad();
|
||||
});
|
||||
}).catch((err) => {
|
||||
console.warn("Unable to decrypt attachment: ", err)
|
||||
|
|
Loading…
Reference in a new issue