about summary refs log tree commit diff
path: root/app
diff options
context:
space:
mode:
authorClaire <claire.github-309c@sitedethib.com>2021-07-23 02:53:17 +0200
committerGitHub <noreply@github.com>2021-07-23 02:53:17 +0200
commite9659ae0312d0bf0acf2b55eed5dc688929cae04 (patch)
tree4ea1b892ff3bd4a1db6228e753ba14e77a79d758 /app
parentd8629e7b86b6fcaedc8b31de57dd95e85fe4fb04 (diff)
Fix crashes with Microsoft Translate on Microsoft Edge (#16525)
Fixes #16509

Microsoft Edge with translation enabled rewrites the DOM in ways that confuse
react and prevent it from working properly. Wrapping the offending parts in
a span avoids this issue.
Diffstat (limited to 'app')
-rw-r--r--app/javascript/mastodon/components/status.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/javascript/mastodon/components/status.js b/app/javascript/mastodon/components/status.js
index 295e83f58..ccc9067d1 100644
--- a/app/javascript/mastodon/components/status.js
+++ b/app/javascript/mastodon/components/status.js
@@ -309,8 +309,8 @@ class Status extends ImmutablePureComponent {
       return (
         <HotKeys handlers={handlers}>
           <div ref={this.handleRef} className={classNames('status__wrapper', { focusable: !this.props.muted })} tabIndex='0'>
-            {status.getIn(['account', 'display_name']) || status.getIn(['account', 'username'])}
-            {status.get('content')}
+            <span>{status.getIn(['account', 'display_name']) || status.getIn(['account', 'username'])}</span>
+            <span>{status.get('content')}</span>
           </div>
         </HotKeys>
       );