Skip to content

Commit acf3c0b

Browse files
committed
Merge pull request twbs#14570 from twbs/remove-modal-open-after-backdrop-closed
Remove `.modal-open` class after backdrop is hidden
2 parents 7441d3f + c4f431d commit acf3c0b

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

js/modal.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,6 @@
107107

108108
this.isShown = false
109109

110-
this.$body.removeClass('modal-open')
111-
112-
this.resetScrollbar()
113110
this.escape()
114111

115112
$(document).off('focusin.bs.modal')
@@ -150,6 +147,8 @@
150147
var that = this
151148
this.$element.hide()
152149
this.backdrop(function () {
150+
that.$body.removeClass('modal-open')
151+
that.resetScrollbar()
153152
that.$element.trigger('hidden.bs.modal')
154153
})
155154
}

0 commit comments

Comments
 (0)