@textbus/platform-browser 3.7.1 → 3.7.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.
@@ -2602,6 +2602,9 @@ class Viewer extends Starter {
2602
2602
  this.isReady = true;
2603
2603
  if (this.options.autoFocus) {
2604
2604
  input.onReady.then(() => {
2605
+ if (this.destroyed) {
2606
+ return;
2607
+ }
2605
2608
  this.focus();
2606
2609
  });
2607
2610
  }
@@ -2627,7 +2630,7 @@ class Viewer extends Starter {
2627
2630
  * 取消编辑器焦点
2628
2631
  */
2629
2632
  blur() {
2630
- if (this.isReady) {
2633
+ if (this.isReady && !this.destroyed) {
2631
2634
  const selection = this.get(Selection);
2632
2635
  selection.unSelect();
2633
2636
  selection.restore();
package/bundles/index.js CHANGED
@@ -2604,6 +2604,9 @@ class Viewer extends core.Starter {
2604
2604
  this.isReady = true;
2605
2605
  if (this.options.autoFocus) {
2606
2606
  input.onReady.then(() => {
2607
+ if (this.destroyed) {
2608
+ return;
2609
+ }
2607
2610
  this.focus();
2608
2611
  });
2609
2612
  }
@@ -2629,7 +2632,7 @@ class Viewer extends core.Starter {
2629
2632
  * 取消编辑器焦点
2630
2633
  */
2631
2634
  blur() {
2632
- if (this.isReady) {
2635
+ if (this.isReady && !this.destroyed) {
2633
2636
  const selection = this.get(core.Selection);
2634
2637
  selection.unSelect();
2635
2638
  selection.restore();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@textbus/platform-browser",
3
- "version": "3.7.1",
3
+ "version": "3.7.2",
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": "ae5d2d19a2e6125b530ddef636e20e5a861e8136"
51
+ "gitHead": "0fafe249121abf8bd86abd956edc7ee298d84636"
52
52
  }