Repository navigation
Conversation
|
Sorry, I missed all the PRs. Can you please delete merge commit and rebase instead? |
| </ReactMarkdown> | ||
| )} | ||
| > | ||
| <ImageClickContext.Provider value={onImageClick}> |
There was a problem hiding this comment.
Honestly I don't think it should be a context. It's makes things more complicated than it needs to be
There was a problem hiding this comment.
Context helps there because this way we avoid remounting potentially translated markdown content. But this may be unnecessary change I made while searching for the cause of the crash.
I'll look into it later and try to simplify this pr
Can you point what was the reason of the crash specifically? |
|
@y9san9 Translate plugin is replacing the text nodes with the translated ones, react then is failing to edit removed node or insert elements in relation to them. Wrapping text with span fixes this. Alternatively we could just instruct translate extension not to translate the site, but probably some other extensions would do the same so I think this is worth it. |
|
@sleroq Yeah and can you point to the specific lines in this PR that wrap text into spans in the post description? I am from mobile now, I hope you are not :D Also would be nice to separate this single thing and other changes, since I am not against optimizing for translaters |
26034d2 to
4df2361
Compare
Resolves #323
Chrome translation replaces text nodes that React still expects to find.
Changes:
To be clear - the crash I've reproduced was only caused by the post content. Other stuff in theory can cause a crash as well, but it's not super necessary.