diff options
author | Claire <claire.github-309c@sitedethib.com> | 2021-04-06 11:17:52 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-06 11:17:52 +0200 |
commit | df326b8b5c0659edb2aca77690a892f228b0e099 (patch) | |
tree | 0d6b014047fa80270377b83e313aa882923c9429 /app/javascript/flavours/glitch/features/ui/components | |
parent | 39b9a0619ab4ba68ed429152153cf0dbbfcd5a5a (diff) | |
parent | 5c225b03db280c94dc3519dc5bad2cac86487e9b (diff) |
Merge pull request #1519 from ClearlyClaire/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'app/javascript/flavours/glitch/features/ui/components')
-rw-r--r-- | app/javascript/flavours/glitch/features/ui/components/columns_area.js | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/app/javascript/flavours/glitch/features/ui/components/columns_area.js b/app/javascript/flavours/glitch/features/ui/components/columns_area.js index b41de58d7..4ea7b48fe 100644 --- a/app/javascript/flavours/glitch/features/ui/components/columns_area.js +++ b/app/javascript/flavours/glitch/features/ui/components/columns_area.js @@ -90,7 +90,11 @@ class ColumnsArea extends ImmutablePureComponent { } if (this.mediaQuery) { - this.mediaQuery.addEventListener('change', this.handleLayoutChange); + if (this.mediaQuery.addEventListener) { + this.mediaQuery.addEventListener('change', this.handleLayoutChange); + } else { + this.mediaQuery.addListener(this.handleLayoutChange); + } this.setState({ renderComposePanel: !this.mediaQuery.matches }); } @@ -125,7 +129,11 @@ class ColumnsArea extends ImmutablePureComponent { } if (this.mediaQuery) { - this.mediaQuery.removeEventListener('change', this.handleLayoutChange); + if (this.mediaQuery.removeEventListener) { + this.mediaQuery.removeEventListener('change', this.handleLayoutChange); + } else { + this.mediaQuery.removeListener(this.handleLayouteChange); + } } } |