Skip to content

Commit

Permalink
fix firewall pane's save/revert not showing up when scrolled down on …
Browse files Browse the repository at this point in the history
…small screens
  • Loading branch information
gorhill committed Apr 20, 2018
1 parent 86e80d4 commit 9d8e2e2
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions src/js/popup.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 9d8e2e2

Please sign in to comment.