Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion css/bootstrap-modal.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,12 @@
.modal-open {
overflow: hidden;
}

.modal-open body {
overflow-y:scroll;
}
.modal-open .navbar-fixed-top, .modal-open .navbar-fixed-bottom {
left: -17px;
}

/* add a scroll bar to stop page from jerking around */
.modal-open.page-overflow .page-container,
Expand Down
14 changes: 6 additions & 8 deletions js/bootstrap-modalmanager.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,9 @@
modal.isShown = true;

var transition = $.support.transition && modal.$element.hasClass('fade');

that.$element
.toggleClass('modal-open', that.hasOpenModal())
.toggleClass('page-overflow', $(window).height() < that.$element.height());

$('html').toggleClass('modal-open', that.hasOpenModal());
that.$element.toggleClass('page-overflow', $(window).height() < that.$element.height());

modal.$parent = modal.$element.parent();

Expand Down Expand Up @@ -165,7 +164,7 @@

var hasOpenModal = this.hasOpenModal();

this.$element.toggleClass('modal-open', hasOpenModal);
$('html').toggleClass('modal-open', hasOpenModal);

if (!hasOpenModal){
this.$element.removeClass('page-overflow');
Expand Down Expand Up @@ -307,9 +306,8 @@
loading: function (callback) {
callback = callback || function () { };

this.$element
.toggleClass('modal-open', !this.isLoading || this.hasOpenModal())
.toggleClass('page-overflow', $(window).height() < this.$element.height());
$('html').toggleClass('modal-open', that.hasOpenModal());
this.$element.toggleClass('page-overflow', $(window).height() < this.$element.height());

if (!this.isLoading) {

Expand Down