From 002a825891bd490b49961609a97ff7f9bd8cca29 Mon Sep 17 00:00:00 2001 From: Raymond Hill Date: Sun, 3 May 2020 09:26:19 -0400 Subject: [PATCH] Add tolerance to popup panel when checking viewport width I meant to add this to last commit: - https://github.com/gorhill/uBlock/commit/a54718862c9e9a4c5cfe3b6c2e6539a1c562f477 --- 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 85b56cab1..e6507a46c 100644 --- a/src/js/popup-fenix.js +++ b/src/js/popup-fenix.js @@ -1169,7 +1169,7 @@ const getPopupData = async function(tabId) { if ( root.classList.contains('desktop') ) { const main = document.getElementById('main'); const firewall = document.getElementById('firewall'); - const minWidth = Math.floor(main.offsetWidth + firewall.offsetWidth); + const minWidth = Math.floor(main.offsetWidth + firewall.offsetWidth) - 4; if ( document.body.offsetWidth < minWidth ) { root.classList.remove('desktop'); } else {