From 6945c2ac68369fe0e1a9b2623763cb385458ad62 Mon Sep 17 00:00:00 2001 From: Wesley Cho Date: Wed, 29 Jul 2015 15:37:42 -0700 Subject: [PATCH] fix(modal): animate backdrop concurrently with window - Start animation of backdrop at the same time as the window Closes #4036 --- src/modal/modal.js | 2 +- src/modal/test/modal.spec.js | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) 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);