Skip to content

Commit

Permalink
Bug fix. Parent window scroll bar problem when more than one Modal wa…
Browse files Browse the repository at this point in the history
…s open.
  • Loading branch information
cootetom committed Feb 16, 2012
1 parent 2cd49f6 commit 0e3da03
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
10 changes: 6 additions & 4 deletions SimpleModal.js
Expand Up @@ -56,10 +56,12 @@ var SimpleModal = function() {
} }


// prevent parent from scrolling whilst pop up is overlayed on top // prevent parent from scrolling whilst pop up is overlayed on top
var overflow = $(document.body).css('overflow').toLowerCase() || 'visible'; if ($('._simpleModalMask').length < 1) {
$(document.body).data('simpleModalOverflow', overflow); var overflow = $(document.body).css('overflow').toLowerCase() || 'visible';
$(document.body).css('overflow', 'hidden'); $(document.body).data('simpleModalOverflow', overflow);

$(document.body).css('overflow', 'hidden');
}

var mask = document.createElement('div'), var mask = document.createElement('div'),
eDiv = document.createElement('div'); eDiv = document.createElement('div');


Expand Down
10 changes: 3 additions & 7 deletions SimpleModal.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 0e3da03

Please sign in to comment.