@textbus/platform-browser 4.0.0-alpha.60 → 4.0.0-alpha.62

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.
@@ -1973,6 +1973,10 @@ let NativeInput = class NativeInput extends Input {
1973
1973
  compositionUpdate(ev.data);
1974
1974
  }), fromEvent(input, 'compositionend').subscribe(ev => {
1975
1975
  compositionEnd(ev.data);
1976
+ const startContainer = this.nativeSelection.focusNode;
1977
+ if (startContainer instanceof Text && startContainer.textContent === ev.data) {
1978
+ startContainer.remove();
1979
+ }
1976
1980
  }), fromEvent(input, 'beforeinput').subscribe(ev => {
1977
1981
  var _a;
1978
1982
  switch (ev.inputType) {
@@ -2096,6 +2100,10 @@ let NativeInput = class NativeInput extends Input {
2096
2100
  }))).subscribe(text => {
2097
2101
  this.composition = false;
2098
2102
  if (text) {
2103
+ const startContainer = this.nativeSelection.focusNode;
2104
+ if (startContainer instanceof Text && startContainer.textContent === text) {
2105
+ startContainer.remove();
2106
+ }
2099
2107
  this.commander.write(text);
2100
2108
  }
2101
2109
  if (isCompositionEnd) {
package/bundles/index.js CHANGED
@@ -1975,6 +1975,10 @@ exports.NativeInput = class NativeInput extends Input {
1975
1975
  compositionUpdate(ev.data);
1976
1976
  }), stream.fromEvent(input, 'compositionend').subscribe(ev => {
1977
1977
  compositionEnd(ev.data);
1978
+ const startContainer = this.nativeSelection.focusNode;
1979
+ if (startContainer instanceof Text && startContainer.textContent === ev.data) {
1980
+ startContainer.remove();
1981
+ }
1978
1982
  }), stream.fromEvent(input, 'beforeinput').subscribe(ev => {
1979
1983
  var _a;
1980
1984
  switch (ev.inputType) {
@@ -2098,6 +2102,10 @@ exports.NativeInput = class NativeInput extends Input {
2098
2102
  }))).subscribe(text => {
2099
2103
  this.composition = false;
2100
2104
  if (text) {
2105
+ const startContainer = this.nativeSelection.focusNode;
2106
+ if (startContainer instanceof Text && startContainer.textContent === text) {
2107
+ startContainer.remove();
2108
+ }
2101
2109
  this.commander.write(text);
2102
2110
  }
2103
2111
  if (isCompositionEnd) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@textbus/platform-browser",
3
- "version": "4.0.0-alpha.60",
3
+ "version": "4.0.0-alpha.62",
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",
@@ -25,10 +25,10 @@
25
25
  "typescript editor"
26
26
  ],
27
27
  "dependencies": {
28
- "@tanbo/stream": "^1.2.4",
29
- "@textbus/collaborate": "^4.0.0-alpha.60",
30
- "@textbus/core": "^4.0.0-alpha.60",
31
- "@viewfly/core": "^1.0.0-alpha.10"
28
+ "@tanbo/stream": "^1.2.5",
29
+ "@textbus/collaborate": "^4.0.0-alpha.61",
30
+ "@textbus/core": "^4.0.0-alpha.61",
31
+ "@viewfly/core": "^1.0.0-alpha.11"
32
32
  },
33
33
  "devDependencies": {
34
34
  "@rollup/plugin-commonjs": "^23.0.2",
@@ -48,5 +48,5 @@
48
48
  "bugs": {
49
49
  "url": "https://github.com/textbus/textbus.git/issues"
50
50
  },
51
- "gitHead": "bae80846bc8c26754af661e35dea236db237aeeb"
51
+ "gitHead": "1077dc15671dc6a8cd168c375f2c7b5ef175d096"
52
52
  }