From 87ecd1e62bb4062d7cbccf9fa4fb6ba4095e7db5 Mon Sep 17 00:00:00 2001 From: "trop[bot]" <37223003+trop[bot]@users.noreply.github.com> Date: Mon, 9 Sep 2024 17:40:31 +0200 Subject: [PATCH] fix: update `BrowserView#lastWindowSize` after window resize (#43635) fix: update BrowserView#lastWindowSize after window resize (#43462) Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: Zonglong Liu <83216456+mai-121@users.noreply.github.com> --- lib/browser/api/browser-view.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/browser/api/browser-view.ts b/lib/browser/api/browser-view.ts index a1659a88ee..ed6670d457 100644 --- a/lib/browser/api/browser-view.ts +++ b/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 () {