diff options
author | kibigo! <marrus-sh@users.noreply.github.com> | 2017-06-25 15:52:55 -0700 |
---|---|---|
committer | kibigo! <marrus-sh@users.noreply.github.com> | 2017-06-25 15:52:55 -0700 |
commit | 6a50e730896f599f16961c118126b805e26e2f53 (patch) | |
tree | e5e78adafc1afd01d4cdc092ced753b21dde409d /app/javascript | |
parent | b1f9892e635a8f34b5cbf4ece15d3101cf1cf1c3 (diff) |
Auto-uncollapse when expanding CW
Diffstat (limited to 'app/javascript')
-rw-r--r-- | app/javascript/mastodon/components/status.js | 4 | ||||
-rw-r--r-- | app/javascript/styles/components.scss | 5 |
2 files changed, 3 insertions, 6 deletions
diff --git a/app/javascript/mastodon/components/status.js b/app/javascript/mastodon/components/status.js index 44645d7d1..586661649 100644 --- a/app/javascript/mastodon/components/status.js +++ b/app/javascript/mastodon/components/status.js @@ -166,11 +166,11 @@ class StatusUnextended extends ImmutablePureComponent { } handleExpandedToggle = () => { - if (!this.state.isCollapsed) this.setState({ isExpanded: !this.state.isExpanded }); + this.setState({ isExpanded: !this.state.isExpanded, isCollapsed: false }); }; handleCollapsedClick = () => { - this.setState({ isCollapsed: !this.state.isCollapsed }); + this.setState({ isCollapsed: !this.state.isCollapsed, isExpanded: false }); } render () { diff --git a/app/javascript/styles/components.scss b/app/javascript/styles/components.scss index 15bae3dee..0418ffd89 100644 --- a/app/javascript/styles/components.scss +++ b/app/javascript/styles/components.scss @@ -525,16 +525,13 @@ text-transform: uppercase; line-height: 18px; cursor: pointer; - transition: background-color .3s, color .3s; &:hover { background: lighten($ui-base-color, 33%); text-decoration: none; } - .status-collapsed &, .status-collapsed &:hover { - background: transparent; - color: lighten($ui-base-color, 30%); + .status-collapsed & { vertical-align: bottom; } } |