@kaitify/vue 0.0.1-beta.17 → 0.0.1-beta.18

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.
@@ -37807,10 +37807,12 @@ class Editor {
37807
37807
  this.delete();
37808
37808
  return;
37809
37809
  } else if (node.isText()) {
37810
- const deleteChart = node.textContent.substring(offset2 - 1, offset2);
37811
- node.textContent = node.textContent.substring(0, offset2 - 1) + node.textContent.substring(offset2);
37812
- this.selection.start.offset = offset2 - 1;
37813
- this.selection.end.offset = offset2 - 1;
37810
+ const charArray = Array.from(node.textContent.substring(0, offset2));
37811
+ const deleteChart = charArray.pop();
37812
+ const deleteChartLength = deleteChart.length;
37813
+ node.textContent = charArray.join("") + node.textContent.substring(offset2);
37814
+ this.selection.start.offset = offset2 - deleteChartLength;
37815
+ this.selection.end.offset = offset2 - deleteChartLength;
37814
37816
  if (isZeroWidthText(deleteChart)) {
37815
37817
  this.delete();
37816
37818
  return;