Prevent the page from being scrolled with opened options.

This commit is contained in:
Nicolas Stepien 2012-02-05 14:17:19 +01:00
parent 6742f09a4f
commit e269182e8d
2 changed files with 6 additions and 1 deletions

View File

@ -2113,6 +2113,7 @@
id: 'overlay'
});
$.on(overlay, 'click', function() {
d.body.style.removeProperty('overflow');
return $.rm(overlay);
});
$.on(dialog, 'click', function(e) {
@ -2120,6 +2121,7 @@
});
$.add(overlay, dialog);
$.add(d.body, overlay);
d.body.style.setProperty('overflow', 'hidden', 'important');
options.backlink.call(back);
options.time.call(time);
return options.favicon.call(favicon);

View File

@ -1647,10 +1647,13 @@ options =
indicators[@name].hidden = @checked
overlay = $.el 'div', id: 'overlay'
$.on overlay, 'click', -> $.rm overlay
$.on overlay, 'click', ->
d.body.style.removeProperty 'overflow'
$.rm overlay
$.on dialog, 'click', (e) -> e.stopPropagation()
$.add overlay, dialog
$.add d.body, overlay
d.body.style.setProperty 'overflow', 'hidden', 'important'
options.backlink.call back
options.time.call time