This repository was archived by the owner on May 29, 2019. It is now read-only.
File tree 2 files changed +19
-1
lines changed
2 files changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -62,7 +62,9 @@ angular.module('ui.bootstrap.modal', [])
62
62
restrict : 'EA' ,
63
63
replace : true ,
64
64
templateUrl : 'template/modal/backdrop.html' ,
65
- link : function ( scope , element , attrs ) {
65
+ link : function ( scope ) {
66
+
67
+ scope . animate = false ;
66
68
67
69
//trigger CSS transitions
68
70
$timeout ( function ( ) {
Original file line number Diff line number Diff line change @@ -375,6 +375,22 @@ describe('$modal', function () {
375
375
expect ( $document ) . toHaveModalOpenWithContent ( 'Static backdrop' , 'div' ) ;
376
376
expect ( $document ) . toHaveBackdrop ( ) ;
377
377
} ) ;
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
+ } ) ;
378
394
} ) ;
379
395
380
396
describe ( 'custom window classes' , function ( ) {
You can’t perform that action at this time.
0 commit comments