]> cat aescling's git repositories - mastodon.git/commitdiff
Prevent contents of the status placeholder from overflowing (#3287)
authorunarist <m.unarist@gmail.com>
Thu, 25 May 2017 00:23:54 +0000 (09:23 +0900)
committerEugen Rochko <eugen@zeonfederated.com>
Thu, 25 May 2017 00:23:54 +0000 (02:23 +0200)
Since long lines may overflow and cause the status-list horizontally scrollable,
I added `overflow: hidden` to placeholder contents to prevent it.

app/javascript/mastodon/components/status.js

index 549592c6b60d5fa02fe5cc8e37bb78c4f7bf8da2..a1f52226fafecdf152a0aabbe7111f676b7c9d9b 100644 (file)
@@ -95,7 +95,7 @@ class Status extends ImmutablePureComponent {
 
     if (isIntersecting === false && isHidden) {
       return (
-        <div ref={this.handleRef} data-id={status.get('id')} style={{ height: `${this.height}px`, opacity: 0 }}>
+        <div ref={this.handleRef} data-id={status.get('id')} style={{ height: `${this.height}px`, opacity: 0, overflow: 'hidden' }}>
           {status.getIn(['account', 'display_name']) || status.getIn(['account', 'username'])}
           {status.get('content')}
         </div>