@kaitify/core 0.0.1-beta.24 → 0.0.1-beta.25

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.
@@ -38050,10 +38050,12 @@ class Editor {
38050
38050
  this.delete();
38051
38051
  return;
38052
38052
  } else if (node.isText()) {
38053
- const deleteChart = node.textContent.substring(offset - 1, offset);
38054
- node.textContent = node.textContent.substring(0, offset - 1) + node.textContent.substring(offset);
38055
- this.selection.start.offset = offset - 1;
38056
- this.selection.end.offset = offset - 1;
38053
+ const charArray = Array.from(node.textContent.substring(0, offset));
38054
+ const deleteChart = charArray.pop();
38055
+ const deleteChartLength = deleteChart.length;
38056
+ node.textContent = charArray.join("") + node.textContent.substring(offset);
38057
+ this.selection.start.offset = offset - deleteChartLength;
38058
+ this.selection.end.offset = offset - deleteChartLength;
38057
38059
  if (isZeroWidthText(deleteChart)) {
38058
38060
  this.delete();
38059
38061
  return;