Skip to content

Commit

Permalink
trigger a relayout due to firebox's buggy transition end
Browse files Browse the repository at this point in the history
  • Loading branch information
Jordan Schroter committed Sep 11, 2013
1 parent 1e35b1f commit 3731fd5
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions js/bootstrap-modalmanager.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@
modal.$element.appendTo(modal.$container);

that.backdrop(modal, function () {

modal.$element.show();

if (transition) {
Expand Down Expand Up @@ -113,8 +112,12 @@
modal.$element.on('hidden.modalmanager', targetIsSelf(function (e) {

that.backdrop(modal);

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

// trigger a relayout due to firebox's buggy transition end event
if (transition) { modal.$element[0].offsetWidth; }

$.support.transition && modal.$element.hasClass('fade') ?
modal.$backdrop.one($.support.transition.end, function () { that.destroyModal(modal) }) :
that.destroyModal(modal);
Expand All @@ -131,7 +134,6 @@
},

destroyModal: function (modal) {

modal.destroy();

var hasOpenModal = this.hasOpenModal();
Expand Down

0 comments on commit 3731fd5

Please sign in to comment.