about summary refs log tree commit diff
path: root/app/javascript
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2018-05-05 23:05:43 +0200
committerGitHub <noreply@github.com>2018-05-05 23:05:43 +0200
commit660db468c09146802bd4418599cf4103ef190c10 (patch)
treec9359e81f8aaae40f2be6fa688d7315a282fc7c5 /app/javascript
parent8da4bf0f901d7b20f3ca7c6975a0d21a56fb735c (diff)
Do not count search route as compose being mounted in web UI (#7372)
Fix #7144
Diffstat (limited to 'app/javascript')
-rw-r--r--app/javascript/mastodon/features/compose/index.js12
1 files changed, 10 insertions, 2 deletions
diff --git a/app/javascript/mastodon/features/compose/index.js b/app/javascript/mastodon/features/compose/index.js
index 67f0e7981..19aae0332 100644
--- a/app/javascript/mastodon/features/compose/index.js
+++ b/app/javascript/mastodon/features/compose/index.js
@@ -43,11 +43,19 @@ export default class Compose extends React.PureComponent {
   };
 
   componentDidMount () {
-    this.props.dispatch(mountCompose());
+    const { isSearchPage } = this.props;
+
+    if (!isSearchPage) {
+      this.props.dispatch(mountCompose());
+    }
   }
 
   componentWillUnmount () {
-    this.props.dispatch(unmountCompose());
+    const { isSearchPage } = this.props;
+
+    if (!isSearchPage) {
+      this.props.dispatch(unmountCompose());
+    }
   }
 
   onFocus = () => {