From 3d010a8988ef23b98c4653891645c57d11fe2d80 Mon Sep 17 00:00:00 2001 From: gellert Date: Sun, 19 Jun 2016 00:41:42 +0200 Subject: [PATCH] fixes transformed webview size --- lib/renderer/web-view/web-view.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/renderer/web-view/web-view.js b/lib/renderer/web-view/web-view.js index 82ed62dd3a5d..98ca22d94986 100644 --- a/lib/renderer/web-view/web-view.js +++ b/lib/renderer/web-view/web-view.js @@ -166,6 +166,12 @@ var WebViewImpl = (function () { resizeEvent = new Event('resize', { bubbles: true }) + + // Using client size values, because when a webview is transformed `newSize` + // is incorrect + newSize.width = this.webviewNode.clientWidth + newSize.height = this.webviewNode.clientHeight + resizeEvent.newWidth = newSize.width resizeEvent.newHeight = newSize.height this.dispatchEvent(resizeEvent)