fixed position to avoid scrolling away

The overlay menu should remain visible when scrolling a long page.  The
intention is to present information on demand and not leave the menu on
screen. If allowed to scroll away the remaining element could interfere
with the page.
This commit is contained in:
Matthew Kastor 2013-04-01 00:12:56 -04:00 committed by nightwing
commit 6b1e90fbc7

View file

@ -46,9 +46,9 @@ module.exports.overlayPage = function overlayPage (contentElement, top, right, b
var contentContainer = document.createElement('div');
closer.style.cssText = 'margin: 0; padding: 0; ' +
'position: absolute; top:0; bottom:0; left:0; right:0;' +
'position: fixed; top:0; bottom:0; left:0; right:0;' +
'z-index: 9990; ' +
'background-color: rgba(0, 0, 0, 0.1);';
'background-color: rgba(0, 0, 0, 0.2);';
closer.addEventListener('click', function () {
closer.parentNode.removeChild(closer);
closer = null;