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:
parent
a54718862c
commit
002a825891
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user