1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-09-15 07:22:28 +02:00

Avoid fractional pixel in viewport height

Fractional pixel could lead to minor scrollbar
glitch -- reported internally.
This commit is contained in:
Raymond Hill 2020-05-05 07:08:38 -04:00
parent b69d802f17
commit 6c90cdae3a
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2

View File

@ -2787,7 +2787,7 @@ logger.resize = (function() {
const crect = elem.getBoundingClientRect();
const dh = crect.bottom - vrect.bottom;
if ( dh === 0 ) { continue; }
elem.style.height = (crect.height - dh) + 'px';
elem.style.height = Math.ceil(crect.height - dh) + 'px';
}
};