mirror of https://github.com/gorhill/uBlock.git
fix firewall pane's save/revert not showing up when scrolled down on small screens
This commit is contained in:
parent
86e80d43d6
commit
9d8e2e20fb
|
@ -62,14 +62,15 @@ if (
|
||||||
// - Its vertical position depends on the height of the popup title bar
|
// - Its vertical position depends on the height of the popup title bar
|
||||||
// - Its horizontal position depends on whether there is a vertical scrollbar.
|
// - Its horizontal position depends on whether there is a vertical scrollbar.
|
||||||
var positionRulesetTools = function() {
|
var positionRulesetTools = function() {
|
||||||
document.getElementById('rulesetTools').style.setProperty(
|
var vpos = document.getElementById('appinfo')
|
||||||
'top',
|
.getBoundingClientRect()
|
||||||
(document.getElementById('appinfo').getBoundingClientRect().bottom + 3) + 'px'
|
.bottom + window.scrollY + 3;
|
||||||
);
|
var hpos = document.getElementById('firewallContainer')
|
||||||
document.getElementById('rulesetTools').style.setProperty(
|
.getBoundingClientRect()
|
||||||
'left',
|
.left + window.scrollX + 3;
|
||||||
(document.getElementById('firewallContainer').getBoundingClientRect().left + 3) + 'px'
|
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
|
// https://github.com/chrisaljoudi/uBlock/issues/996
|
||||||
|
|
Loading…
Reference in New Issue