From 84d61c7f5ab31556fb61afd6e82f76d4a36f961f Mon Sep 17 00:00:00 2001 From: Yichuan Shen Date: Fri, 10 Mar 2017 23:12:45 +0100 Subject: [PATCH] Don't measure DOM for window size Adresses #175 --- browser/index.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/browser/index.js b/browser/index.js index 87a4d2149..ba5f8b6b0 100644 --- a/browser/index.js +++ b/browser/index.js @@ -2595,9 +2595,8 @@ $(window).on('load', function() { sabaki.detachEngine() if (!win.isMaximized() && !win.isMinimized() && !win.isFullScreen()) { - setting - .set('window.width', Math.round($('body').width())) - .set('window.height', Math.round($('body').height())) + let [width, height] = win.getContentSize() + setting.set('window.width', width).set('window.height', height) } } })