This repository was archived by the owner on May 29, 2019. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -62,7 +62,9 @@ angular.module('ui.bootstrap.modal', [])
6262 restrict : 'EA' ,
6363 replace : true ,
6464 templateUrl : 'template/modal/backdrop.html' ,
65- link : function ( scope , element , attrs ) {
65+ link : function ( scope ) {
66+
67+ scope . animate = false ;
6668
6769 //trigger CSS transitions
6870 $timeout ( function ( ) {
Original file line number Diff line number Diff line change @@ -375,6 +375,22 @@ describe('$modal', function () {
375375 expect ( $document ) . toHaveModalOpenWithContent ( 'Static backdrop' , 'div' ) ;
376376 expect ( $document ) . toHaveBackdrop ( ) ;
377377 } ) ;
378+
379+ it ( 'should animate backdrop on each modal opening' , function ( ) {
380+
381+ var modal = open ( { template : '<div>With backdrop</div>' } ) ;
382+ var backdropEl = $document . find ( 'body > div.modal-backdrop' ) ;
383+ expect ( backdropEl ) . not . toHaveClass ( 'in' ) ;
384+
385+ $timeout . flush ( ) ;
386+ expect ( backdropEl ) . toHaveClass ( 'in' ) ;
387+
388+ dismiss ( modal ) ;
389+ modal = open ( { template : '<div>With backdrop</div>' } ) ;
390+ backdropEl = $document . find ( 'body > div.modal-backdrop' ) ;
391+ expect ( backdropEl ) . not . toHaveClass ( 'in' ) ;
392+
393+ } ) ;
378394 } ) ;
379395
380396 describe ( 'custom window classes' , function ( ) {
You can’t perform that action at this time.
0 commit comments