1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-11-07 03:12:33 +01:00

Add tolerance to popup panel when checking viewport width

I meant to add this to last commit:
- a54718862c
This commit is contained in:
Raymond Hill 2020-05-03 09:26:19 -04:00
parent a54718862c
commit 002a825891
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2

View File

@ -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 {