@textbus/platform-browser 3.7.1 → 3.7.3

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.
@@ -369,6 +369,7 @@ let SelectionBridge = class SelectionBridge {
369
369
  }
370
370
  minLeft = rect2.left;
371
371
  minTop = rect2.top;
372
+ oldPosition = position;
372
373
  }
373
374
  if (isToPrevLine) {
374
375
  if (rect2.left < startLeft) {
@@ -2602,6 +2603,9 @@ class Viewer extends Starter {
2602
2603
  this.isReady = true;
2603
2604
  if (this.options.autoFocus) {
2604
2605
  input.onReady.then(() => {
2606
+ if (this.destroyed) {
2607
+ return;
2608
+ }
2605
2609
  this.focus();
2606
2610
  });
2607
2611
  }
@@ -2627,7 +2631,7 @@ class Viewer extends Starter {
2627
2631
  * 取消编辑器焦点
2628
2632
  */
2629
2633
  blur() {
2630
- if (this.isReady) {
2634
+ if (this.isReady && !this.destroyed) {
2631
2635
  const selection = this.get(Selection);
2632
2636
  selection.unSelect();
2633
2637
  selection.restore();
package/bundles/index.js CHANGED
@@ -371,6 +371,7 @@ exports.SelectionBridge = class SelectionBridge {
371
371
  }
372
372
  minLeft = rect2.left;
373
373
  minTop = rect2.top;
374
+ oldPosition = position;
374
375
  }
375
376
  if (isToPrevLine) {
376
377
  if (rect2.left < startLeft) {
@@ -2604,6 +2605,9 @@ class Viewer extends core.Starter {
2604
2605
  this.isReady = true;
2605
2606
  if (this.options.autoFocus) {
2606
2607
  input.onReady.then(() => {
2608
+ if (this.destroyed) {
2609
+ return;
2610
+ }
2607
2611
  this.focus();
2608
2612
  });
2609
2613
  }
@@ -2629,7 +2633,7 @@ class Viewer extends core.Starter {
2629
2633
  * 取消编辑器焦点
2630
2634
  */
2631
2635
  blur() {
2632
- if (this.isReady) {
2636
+ if (this.isReady && !this.destroyed) {
2633
2637
  const selection = this.get(core.Selection);
2634
2638
  selection.unSelect();
2635
2639
  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.3",
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": "db4e1056d62087b217bbe5f2c1535e5f4a4d1467"
52
52
  }