From 2d960cf530636bf5c726de9eb122d22368ac3a15 Mon Sep 17 00:00:00 2001 From: Raymond Hill Date: Thu, 7 May 2020 15:24:39 -0400 Subject: [PATCH] Test against `window.innerWidth` to toggle vertical layout --- src/js/popup-fenix.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/js/popup-fenix.js b/src/js/popup-fenix.js index 1db25c437..76a6524d2 100644 --- a/src/js/popup-fenix.js +++ b/src/js/popup-fenix.js @@ -1178,7 +1178,7 @@ const getPopupData = async function(tabId) { const main = document.getElementById('main'); const firewall = document.getElementById('firewall'); const minWidth = (main.offsetWidth + firewall.offsetWidth) / 1.1; - if ( document.body.offsetWidth < minWidth ) { + if ( window.innerWidth < minWidth ) { root.classList.remove('desktop'); } else { const sticky = document.getElementById('sticky');