@netless/telebox-insider 0.3.0-beta.8 → 0.3.0-beta.9

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@netless/telebox-insider",
3
- "version": "0.3.0-beta.8",
3
+ "version": "0.3.0-beta.9",
4
4
  "private": false,
5
5
  "description": "Window widget for Whiteboard",
6
6
  "author": "CRIMX <straybugs@gmail.com> (https://github.com/crimx/)",
@@ -396,7 +396,7 @@ export class TeleBoxManager {
396
396
  const box = this.getBox(targetBox.id);
397
397
  if (box) {
398
398
  let isFocusChanged = false;
399
- if (this.topBox === box) {
399
+ if (box.focus) {
400
400
  this.blurBox(box);
401
401
  isFocusChanged = true;
402
402
  }
@@ -426,7 +426,7 @@ export class TeleBoxManager {
426
426
  const box = this.getBox(targetBox.id);
427
427
  if (box) {
428
428
  let isFocusChanged = false;
429
- if (this.topBox === box) {
429
+ if (box.focus) {
430
430
  this.blurBox(box);
431
431
  isFocusChanged = true;
432
432
  }
@@ -609,13 +609,13 @@ export class TeleBoxManager {
609
609
  }
610
610
  });
611
611
  this.effectBoxStatusChange();
612
+ console.log("effectBoxesStatusTimerFunc===>newTopBox", newTopBox, curTopBox);
612
613
  if (newTopBox && curTopBox !== newTopBox) {
613
614
  this.topBox$.setValue(newTopBox);
614
- this.focusBox(newTopBox, skipUpdate);
615
615
  }
616
616
  if (!newTopBox && curTopBox) {
617
617
  this.topBox$.setValue(undefined);
618
- this.blurBox(curTopBox, skipUpdate);
618
+ // this.blurBox(curTopBox, skipUpdate);
619
619
  }
620
620
  }
621
621
 
@@ -912,10 +912,8 @@ export class TeleBoxManager {
912
912
  });
913
913
  box._delegateEvents.on(TELE_BOX_DELEGATE_EVENT.Minimize, () => {
914
914
  if (box.boxStatus && this.useBoxesStatus) {
915
- if (this.topBox === box) {
916
- if (this.topBox?.focus) {
917
- this.blurBox(this.topBox);
918
- }
915
+ if(box.focus) {
916
+ this.blurBox(box);
919
917
  }
920
918
  this.setBox(box, {
921
919
  status: TELE_BOX_STATE.Minimized,
@@ -929,6 +927,9 @@ export class TeleBoxManager {
929
927
  }
930
928
  });
931
929
  box._delegateEvents.on(TELE_BOX_DELEGATE_EVENT.Close, () => {
930
+ if (this.useBoxesStatus && box.focus) {
931
+ this.blurBox(box);
932
+ }
932
933
  this.remove(box);
933
934
  this.focusTopBox();
934
935
  });