This repository was archived by the owner on May 29, 2019. It is now read-only.
File tree 2 files changed +6
-3
lines changed
2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -136,7 +136,7 @@ angular.module('ui.bootstrap.modal', [])
136
136
modalWindow . modalDomEl . remove ( ) ;
137
137
138
138
//remove backdrop if no longer needed
139
- if ( backdropIndex ( ) == - 1 ) {
139
+ if ( backdropDomEl && backdropIndex ( ) == - 1 ) {
140
140
backdropDomEl . remove ( ) ;
141
141
backdropDomEl = undefined ;
142
142
}
@@ -312,4 +312,4 @@ angular.module('ui.bootstrap.modal', [])
312
312
} ;
313
313
314
314
return $modalProvider ;
315
- } ) ;
315
+ } ) ;
Original file line number Diff line number Diff line change @@ -351,12 +351,15 @@ describe('$modal', function () {
351
351
describe ( 'backdrop' , function ( ) {
352
352
353
353
it ( 'should not have any backdrop element if backdrop set to false' , function ( ) {
354
- open ( {
354
+ var modal = open ( {
355
355
template : '<div>No backdrop</div>' ,
356
356
backdrop : false
357
357
} ) ;
358
358
expect ( $document ) . toHaveModalOpenWithContent ( 'No backdrop' , 'div' ) ;
359
359
expect ( $document ) . not . toHaveBackdrop ( ) ;
360
+
361
+ dismiss ( modal ) ;
362
+ expect ( $document ) . toHaveModalsOpen ( 0 ) ;
360
363
} ) ;
361
364
362
365
it ( 'should not close modal on backdrop click if backdrop is specified as "static"' , function ( ) {
You can’t perform that action at this time.
0 commit comments