diff --git a/src/modal/modal.js b/src/modal/modal.js index ad9527c35a..0c0405f0d7 100644 --- a/src/modal/modal.js +++ b/src/modal/modal.js @@ -230,8 +230,8 @@ angular.module('ui.bootstrap.modal', []) removeAfterAnimate(modalWindow.modalDomEl, modalWindow.modalScope, function() { body.toggleClass(OPENED_MODAL_CLASS, openedWindows.length() > 0); - checkRemoveBackdrop(); }); + checkRemoveBackdrop(); //move focus to specified element if available, or else to body if (elementToReceiveFocus && elementToReceiveFocus.focus) { diff --git a/src/modal/test/modal.spec.js b/src/modal/test/modal.spec.js index 85b3864bb8..15459a820d 100644 --- a/src/modal/test/modal.spec.js +++ b/src/modal/test/modal.spec.js @@ -179,7 +179,6 @@ describe('$modal', function () { expect($document).toHaveBackdrop(); dismiss(modal, 'closing in test'); - $animate.triggerCallbacks(); expect($document).toHaveModalsOpen(0); @@ -226,7 +225,6 @@ describe('$modal', function () { expect($document).toHaveBackdrop(); dismiss(modal, 'closing in test'); - $animate.triggerCallbacks(); expect($document).toHaveModalsOpen(0);