Cannot select single words on first attempt in text with headings or blockquotes on iOS
When attempting to select a single word in text that contains headings or blockquotes, the selection does not work on the first try.
Video
https://github.com/Expensify/react-native-live-markdown/assets/57348009/c2991145-2ecf-44d9-8942-866cb7f32c9d
@tomekzaw I came across this while testing https://github.com/Expensify/App/issues/44495, and my PR doesn't fix it, so I reported this new issue. Still, I believe the root cause and solution might be similar.
This problem is particularly visible when typing fast inside the component that contains blockquotes:
| Bold | Blockquote |
|---|---|
I believe the problem is caused by NSMutableParagraphStyle. The problem no longer exists when I remove NSMutableParagraphStyle (but obviously there's no padding then). Also, it helps when I make the MarkdownTextInput component uncontrolled. Finally, making the JS thread busy also improves the behavior.
Should be fixed with #520.
Fixed in #520.