Closed dominictb closed 3 months ago
@BartoszGrajdek @Skalakid this should fix https://github.com/Expensify/react-native-live-markdown/pull/341#issuecomment-2146805686 as well
Alright so here's what we're going to do now: We'll revert this PR since a fix for the regression I've mentioned was reverted here. You'll have to make 1 PR with all of these changes and we will do our best to help you along the way with the implementation since it looks like this is a tricky bug. Our goal is to keep react-native-live-markdown
lib as bug-free as we can and that way we can properly test it to ensure nothing breaks. 🙌🏻
@BartoszGrajdek it seems like I couldn't reproduce this https://github.com/Expensify/App/issues/41137#issuecomment-2156739474 on 0.1.83
(the published version, not with this change in this PR) with the change on Expensify/App
PR: https://github.com/Expensify/App/pull/42622 (without the restoreSelectionPosition part).
It seems like after updating the parser version in react-native-live-markdown
, the root cause described here: https://github.com/Expensify/App/issues/41137#issuecomment-2127866960 is not relevant anymore since with the correct parser, divRef.current.innerText === processedValue
in here always holds true.
So after revert the restoreSelectionPosition
change, the only thing left to fix is this comment, which can be done easily on the App repo itself. U guys can merge this PR to fix https://github.com/Expensify/App/issues/41137#issuecomment-2153464605, and the rest I will handle in the Expensify/App
repo
@Skalakid for u to review the PR and the comment above. I have updated with latest details
Details
Related Issues
RCA: https://github.com/Expensify/App/issues/43312#issuecomment-2156740534 Solution: https://github.com/Expensify/App/issues/41137#issuecomment-2156739474
Manual Tests
Linked PRs