Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit a014dcc

Browse files
authored
Merge pull request #594 from matrix-org/luke/fix-scroll-jump-on-video-decryption
Fix scroll jumping when a video is decrypted
2 parents d0d056e + 2658cd0 commit a014dcc

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/components/views/messages/MVideoBody.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,14 @@ import q from 'q';
2727
module.exports = React.createClass({
2828
displayName: 'MVideoBody',
2929

30+
propTypes: {
31+
/* the MatrixEvent to show */
32+
mxEvent: React.PropTypes.object.isRequired,
33+
34+
/* called when the video has loaded */
35+
onWidgetLoad: React.PropTypes.func.isRequired,
36+
},
37+
3038
getInitialState: function() {
3139
return {
3240
decryptedUrl: null,
@@ -100,6 +108,7 @@ module.exports = React.createClass({
100108
decryptedThumbnailUrl: thumbnailUrl,
101109
decryptedBlob: decryptedBlob,
102110
});
111+
this.props.onWidgetLoad();
103112
});
104113
}).catch((err) => {
105114
console.warn("Unable to decrypt attachment: ", err)

0 commit comments

Comments
 (0)