@fendent/react-native-enriched 0.5.2-fork.1 → 0.5.2-fork.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -80,6 +80,12 @@
80
80
  presentStyles[@([[style class] getType])] = [style all:dirtyRange];
81
81
  }
82
82
 
83
+ // Wrap the reset+reapply in beginEditing/endEditing so TextKit processes
84
+ // all attribute changes atomically. Without this, removing
85
+ // NSAttachmentAttributeName triggers a layout pass where \uFFFC has zero
86
+ // width, causing the caret to render inside inline images.
87
+ [_input->textView.textStorage beginEditing];
88
+
83
89
  // now reset the attributes to default ones
84
90
  [_input->textView.textStorage setAttributes:_input->defaultTypingAttributes
85
91
  range:dirtyRange];
@@ -110,6 +116,8 @@
110
116
  [style applyStyling:occurenceRange];
111
117
  }
112
118
  }
119
+
120
+ [_input->textView.textStorage endEditing];
113
121
  }
114
122
  // do the typing attributes management, with no selection
115
123
  [self manageTypingAttributesWithOnlySelection:NO];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fendent/react-native-enriched",
3
- "version": "0.5.2-fork.1",
3
+ "version": "0.5.2-fork.2",
4
4
  "description": "Rich Text Editor component for React Native",
5
5
  "source": "./src/index.tsx",
6
6
  "main": "./lib/module/index.js",