Permalink
Browse files

Bug fix. Parent window scroll bar problem when more than one Modal wa…

…s open.
  • Loading branch information...
1 parent 2cd49f6 commit 0e3da039b40a45e6c4d1a4439bff9c8560fe950d @cootetom committed Feb 16, 2012
Showing with 9 additions and 11 deletions.
  1. +6 −4 SimpleModal.js
  2. +3 −7 SimpleModal.min.js
View
@@ -56,10 +56,12 @@ var SimpleModal = function() {
}
// prevent parent from scrolling whilst pop up is overlayed on top
- var overflow = $(document.body).css('overflow').toLowerCase() || 'visible';
- $(document.body).data('simpleModalOverflow', overflow);
- $(document.body).css('overflow', 'hidden');
-
+ if ($('._simpleModalMask').length < 1) {
+ var overflow = $(document.body).css('overflow').toLowerCase() || 'visible';
+ $(document.body).data('simpleModalOverflow', overflow);
+ $(document.body).css('overflow', 'hidden');
+ }
+
var mask = document.createElement('div'),
eDiv = document.createElement('div');
View

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

0 comments on commit 0e3da03

Please sign in to comment.