Test against window.innerWidth to toggle vertical layout

This commit is contained in:
Raymond Hill 2020-05-07 15:24:39 -04:00
parent 7fb3ee67d6
commit 2d960cf530
No known key found for this signature in database
GPG key ID: 25E1490B761470C2

View file

@ -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');