@netless/window-manager 0.3.17-canary.1 → 0.3.17-canary.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@netless/window-manager",
3
- "version": "0.3.17-canary.1",
3
+ "version": "0.3.17-canary.2",
4
4
  "description": "",
5
5
  "main": "dist/index.es.js",
6
6
  "module": "dist/index.es.js",
package/src/AppManager.ts CHANGED
@@ -98,8 +98,7 @@ export class AppManager {
98
98
  return autorun(() => {
99
99
  const minimized = this.attributes.minimized;
100
100
  if (this.boxManager.minimized !== minimized) {
101
- if (minimized === true && this.store.focus !== undefined) {
102
- this.store.cleanFocus();
101
+ if (minimized === true) {
103
102
  this.boxManager.blurAllBox();
104
103
  }
105
104
  this.boxManager.setMinimized(Boolean(minimized));
package/src/BoxManager.ts CHANGED
@@ -66,6 +66,10 @@ export class BoxManager {
66
66
  });
67
67
  this.teleBoxManager.events.on("minimized", minimized => {
68
68
  this.manager.safeSetAttributes({ minimized });
69
+ if (minimized) {
70
+ this.manager.store.cleanFocus();
71
+ this.blurAllBox();
72
+ }
69
73
  });
70
74
  this.teleBoxManager.events.on("maximized", maximized => {
71
75
  this.manager.safeSetAttributes({ maximized });
package/src/index.ts CHANGED
@@ -177,7 +177,7 @@ export class WindowManager extends InvisiblePlugin<WindowMangerAttributes> {
177
177
  public static containerSizeRatio = DEFAULT_CONTAINER_RATIO;
178
178
  private static isCreated = false;
179
179
 
180
- public version = "0.3.17-canary.1";
180
+ public version = "0.3.17-canary.2";
181
181
 
182
182
  public appListeners?: AppListeners;
183
183