Browse Source

Do not count search route as compose being mounted in web UI (#7372)

Fix #7144
pull/4/head
Eugen Rochko 6 years ago
committed by GitHub
parent
commit
660db468c0
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 2 deletions
  1. +10
    -2
      app/javascript/mastodon/features/compose/index.js

+ 10
- 2
app/javascript/mastodon/features/compose/index.js View File

@ -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 = () => {

Loading…
Cancel
Save