diff options
author | Thibaut Girka <thib@sitedethib.com> | 2020-08-17 13:53:52 +0200 |
---|---|---|
committer | Starfall <us@starfall.systems> | 2020-08-25 13:38:19 -0500 |
commit | d2bd8f55902474253958aba38e2a09e3d24da14d (patch) | |
tree | fae32096a433e3fe814d9ee9284c0004aa868411 /app/javascript/flavours | |
parent | dc3a6bef97d212a27cc6019e8d3d6a18fd6da11c (diff) |
Fix WebUI crash in edge case when media display size causes scroll
Fixes #1406
Diffstat (limited to 'app/javascript/flavours')
-rw-r--r-- | app/javascript/flavours/glitch/components/media_gallery.js | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/app/javascript/flavours/glitch/components/media_gallery.js b/app/javascript/flavours/glitch/components/media_gallery.js index 3a4839414..96042f07a 100644 --- a/app/javascript/flavours/glitch/components/media_gallery.js +++ b/app/javascript/flavours/glitch/components/media_gallery.js @@ -287,10 +287,8 @@ class MediaGallery extends React.PureComponent { } componentDidUpdate (prevProps) { - if (this.node && this.node.offsetWidth && this.node.offsetWidth != this.state.width) { - this.setState({ - width: this.node.offsetWidth, - }); + if (this.node) { + this.handleResize(); } } |