Expensify / react-native-live-markdown

Drop-in replacement for React Native's TextInput component with Markdown formatting.
https://www.npmjs.com/package/@expensify/react-native-live-markdown
MIT License
685 stars 46 forks source link

Fix selection issue for text containing emoji #416

Closed QichenZhu closed 3 days ago

QichenZhu commented 2 weeks ago

Details

Emoji characters are automatically assigned an AppleColorEmoji NSFont and the original font is moved to NSOriginalFont. We need to remove these attributes before comparison.

Related Issues

$ https://github.com/Expensify/App/issues/44495 PROPOSAL: https://github.com/Expensify/App/issues/44495#issuecomment-2197194378

Manual Tests

  1. Type text with an emoji.
  2. Long press to select a word.

Expected Result: Able to select a word.

Screen recordings Before: https://github.com/Expensify/react-native-live-markdown/assets/57348009/ea8ae269-b73f-46a5-96b8-d97feafb606c After: https://github.com/Expensify/react-native-live-markdown/assets/57348009/e6d21184-47f5-4390-b5f1-64169fa766ed

Linked PRs

mollfpr commented 5 days ago

Friendly bump @tomekzaw