@textbus/platform-browser 3.7.8 → 3.7.10

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.
@@ -1463,7 +1463,10 @@ class ExperimentalCaret {
1463
1463
  refresh(isFixedCaret = false) {
1464
1464
  this.isFixed = isFixedCaret;
1465
1465
  if (this.oldRange) {
1466
- this.show(this.oldRange, false);
1466
+ const range = document.createRange();
1467
+ range.setStart(this.oldRange.startContainer, this.oldRange.startOffset);
1468
+ range.setEnd(this.oldRange.endContainer, this.oldRange.endOffset);
1469
+ this.show(range, false);
1467
1470
  }
1468
1471
  this.isFixed = false;
1469
1472
  }
@@ -1474,7 +1477,12 @@ class ExperimentalCaret {
1474
1477
  left: oldRect.left,
1475
1478
  height: oldRect.height
1476
1479
  };
1477
- this.oldRange = range;
1480
+ this.oldRange = {
1481
+ startContainer: range.startContainer,
1482
+ endContainer: range.endContainer,
1483
+ startOffset: range.startOffset,
1484
+ endOffset: range.endOffset
1485
+ };
1478
1486
  if (restart || this.scheduler.lastChangesHasLocalUpdate) {
1479
1487
  clearTimeout(this.timer);
1480
1488
  }
@@ -1898,8 +1906,11 @@ let MagicInput = class MagicInput extends Input {
1898
1906
  if (text) {
1899
1907
  this.commander.write(text);
1900
1908
  }
1909
+ const startSlot = this.selection.startSlot;
1910
+ if (startSlot) {
1911
+ startSlot.changeMarker.forceMarkDirtied();
1912
+ }
1901
1913
  if (isCompositionEnd) {
1902
- const startSlot = this.selection.startSlot;
1903
1914
  if (startSlot) {
1904
1915
  const event = new Event(startSlot, null);
1905
1916
  invokeListener(startSlot.parent, 'onCompositionEnd', event);
package/bundles/index.js CHANGED
@@ -1465,7 +1465,10 @@ class ExperimentalCaret {
1465
1465
  refresh(isFixedCaret = false) {
1466
1466
  this.isFixed = isFixedCaret;
1467
1467
  if (this.oldRange) {
1468
- this.show(this.oldRange, false);
1468
+ const range = document.createRange();
1469
+ range.setStart(this.oldRange.startContainer, this.oldRange.startOffset);
1470
+ range.setEnd(this.oldRange.endContainer, this.oldRange.endOffset);
1471
+ this.show(range, false);
1469
1472
  }
1470
1473
  this.isFixed = false;
1471
1474
  }
@@ -1476,7 +1479,12 @@ class ExperimentalCaret {
1476
1479
  left: oldRect.left,
1477
1480
  height: oldRect.height
1478
1481
  };
1479
- this.oldRange = range;
1482
+ this.oldRange = {
1483
+ startContainer: range.startContainer,
1484
+ endContainer: range.endContainer,
1485
+ startOffset: range.startOffset,
1486
+ endOffset: range.endOffset
1487
+ };
1480
1488
  if (restart || this.scheduler.lastChangesHasLocalUpdate) {
1481
1489
  clearTimeout(this.timer);
1482
1490
  }
@@ -1900,8 +1908,11 @@ exports.MagicInput = class MagicInput extends Input {
1900
1908
  if (text) {
1901
1909
  this.commander.write(text);
1902
1910
  }
1911
+ const startSlot = this.selection.startSlot;
1912
+ if (startSlot) {
1913
+ startSlot.changeMarker.forceMarkDirtied();
1914
+ }
1903
1915
  if (isCompositionEnd) {
1904
- const startSlot = this.selection.startSlot;
1905
1916
  if (startSlot) {
1906
1917
  const event = new core.Event(startSlot, null);
1907
1918
  core.invokeListener(startSlot.parent, 'onCompositionEnd', event);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@textbus/platform-browser",
3
- "version": "3.7.8",
3
+ "version": "3.7.10",
4
4
  "description": "Textbus is a rich text editor and framework that is highly customizable and extensible to achieve rich wysiwyg effects.",
5
5
  "main": "./bundles/index.js",
6
6
  "module": "./bundles/index.esm.js",
@@ -48,5 +48,5 @@
48
48
  "bugs": {
49
49
  "url": "https://github.com/textbus/textbus.git/issues"
50
50
  },
51
- "gitHead": "1e3aa0095dd5ec6747e771be93b2dcefc9717025"
51
+ "gitHead": "cf4fd289b73bc777124a32fe42bb58eba05a34f1"
52
52
  }