1
0
Fork 0
mirror of https://github.com/mastodon/mastodon.git synced 2024-08-20 21:08:15 -07:00

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.
This commit is contained in:
Claire 2021-07-23 02:53:17 +02:00 committed by GitHub
parent d8629e7b86
commit e9659ae031
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -309,8 +309,8 @@ class Status extends ImmutablePureComponent {
return ( return (
<HotKeys handlers={handlers}> <HotKeys handlers={handlers}>
<div ref={this.handleRef} className={classNames('status__wrapper', { focusable: !this.props.muted })} tabIndex='0'> <div ref={this.handleRef} className={classNames('status__wrapper', { focusable: !this.props.muted })} tabIndex='0'>
{status.getIn(['account', 'display_name']) || status.getIn(['account', 'username'])} <span>{status.getIn(['account', 'display_name']) || status.getIn(['account', 'username'])}</span>
{status.get('content')} <span>{status.get('content')}</span>
</div> </div>
</HotKeys> </HotKeys>
); );