Workaround for markdown crash with Google Translate (#1773)
## Issue Depending on what the markdown content was, React crashes when unmounting the component if Google Translate is active. ## Change It seems like the content is too dynamic to apply the same workaround used in 1772 for FileReactions (someone else can take a stab). Until we have a better solution, just make the markdown component (posts, comments, file description, etc.) not participate in Chrome-level translations. It's not a good solution from a user standpoint, but it at least it doesn't crash.
This commit is contained in:
parent
f686d86910
commit
c2b911d73a
1 changed files with 1 additions and 1 deletions
|
@ -253,7 +253,7 @@ export default React.memo<MarkdownProps>(function MarkdownPreview(props: Markdow
|
|||
}
|
||||
|
||||
return (
|
||||
<div dir="auto" className={classnames('markdown-preview', className)}>
|
||||
<div dir="auto" className={classnames('notranslate markdown-preview', className)}>
|
||||
{
|
||||
remark()
|
||||
.use(remarkAttr, remarkAttrOpts)
|
||||
|
|
Loading…
Reference in a new issue