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:
parent
cc4d524a8a
commit
6b1e90fbc7
1 changed files with 2 additions and 2 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue