code review of fix #3038

This commit is contained in:
gorhill 2017-09-19 23:25:08 -04:00
parent 83a791f4d1
commit e9beccba51
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2
1 changed files with 10 additions and 10 deletions

View File

@ -528,19 +528,19 @@ var renderOnce = function() {
lpane = uDom.nodeFromSelector('#panes > div:last-of-type');
var fillViewport = function() {
lpane.style.setProperty(
'height',
Math.max(
window.innerHeight - uDom.nodeFromSelector('#appinfo').offsetHeight,
rpane.offsetHeight
) + 'px'
var newHeight = Math.max(
window.innerHeight - uDom.nodeFromSelector('#appinfo').offsetHeight,
rpane.offsetHeight
);
if ( newHeight !== lpane.offsetHeight ) {
lpane.style.setProperty('height', newHeight + 'px');
}
// https://github.com/gorhill/uBlock/issues/3038
// - Resize the firewall pane while minding the space between the panes.
lpane.style.setProperty(
'width',
(window.offsetWidth - panes.offsetWidth + lpane.offsetWidth) + 'px'
);
var newWidth = window.innerWidth - panes.offsetWidth + lpane.offsetWidth;
if ( newWidth !== lpane.offsetWidth ) {
lpane.style.setProperty('width', newWidth + 'px');
}
};
// https://github.com/gorhill/uBlock/issues/2274