Browse Source

fix: update `BrowserView#lastWindowSize` after window resize (#43463)

fix: update BrowserView#lastWindowSize after window resize (#43462)
Zorro Liu 7 months ago
parent
commit
e2fe8f50e2
1 changed files with 6 additions and 0 deletions
  1. 6 0
      lib/browser/api/browser-view.ts

+ 6 - 0
lib/browser/api/browser-view.ts

@@ -145,6 +145,12 @@ export default class BrowserView {
     if (this.#autoHorizontalProportion || this.#autoVerticalProportion) {
       this.#webContentsView.setBounds(newViewBounds);
     }
+
+    // Update #lastWindowSize value after browser windows resize
+    this.#lastWindowSize = {
+      width: newBounds.width,
+      height: newBounds.height
+    };
   }
 
   get webContentsView () {