File tree 1 file changed +19
-0
lines changed
1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -625,6 +625,25 @@ describe('Modal', () => {
625
625
modal . show ( )
626
626
} )
627
627
628
+ it ( 'should not overflow when clicking outside of modal-content if backdrop = static' , done => {
629
+ fixtureEl . innerHTML = '<div class="modal" data-backdrop="static"><div class="modal-dialog" style="transition-duration: 20ms;" /></div>'
630
+
631
+ const modalEl = fixtureEl . querySelector ( '.modal' )
632
+ const modal = new Modal ( modalEl , {
633
+ backdrop : 'static'
634
+ } )
635
+
636
+ modalEl . addEventListener ( 'shown.bs.modal' , ( ) => {
637
+ modalEl . click ( )
638
+ setTimeout ( ( ) => {
639
+ expect ( modalEl . clientHeight === modalEl . scrollHeight ) . toEqual ( true )
640
+ done ( )
641
+ } , 20 )
642
+ } )
643
+
644
+ modal . show ( )
645
+ } )
646
+
628
647
it ( 'should not adjust the inline body padding when it does not overflow' , done => {
629
648
fixtureEl . innerHTML = '<div class="modal"><div class="modal-dialog" /></div>'
630
649
You can’t perform that action at this time.
0 commit comments