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

fix firewall pane's save/revert not showing up when scrolled down on small screens

This commit is contained in:
Raymond Hill 2018-04-20 16:03:37 -04:00
parent 86e80d43d6
commit 9d8e2e20fb
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2

View File

@ -62,14 +62,15 @@ if (
// - Its vertical position depends on the height of the popup title bar
// - Its horizontal position depends on whether there is a vertical scrollbar.
var positionRulesetTools = function() {
document.getElementById('rulesetTools').style.setProperty(
'top',
(document.getElementById('appinfo').getBoundingClientRect().bottom + 3) + 'px'
);
document.getElementById('rulesetTools').style.setProperty(
'left',
(document.getElementById('firewallContainer').getBoundingClientRect().left + 3) + 'px'
);
var vpos = document.getElementById('appinfo')
.getBoundingClientRect()
.bottom + window.scrollY + 3;
var hpos = document.getElementById('firewallContainer')
.getBoundingClientRect()
.left + window.scrollX + 3;
var style = document.getElementById('rulesetTools').style;
style.setProperty('top', (vpos >>> 0) + 'px');
style.setProperty('left', (hpos >>> 0) + 'px');
};
// https://github.com/chrisaljoudi/uBlock/issues/996