aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHeinrich Fenkart <[email protected]>2014-09-09 00:10:18 +0200
committerHeinrich Fenkart <[email protected]>2014-09-17 09:21:09 +0200
commitc4f431d262c1443bdf07a32890967c2b9688db62 (patch)
treec1f021343fdbe5900d54a0e3e3027071b6a2e4b9
parent859ddc11fb350f985c377474b7727010e7da57a9 (diff)
downloadbootstrap-c4f431d262c1443bdf07a32890967c2b9688db62.tar.xz
bootstrap-c4f431d262c1443bdf07a32890967c2b9688db62.zip
Remove `.modal-open` class after backdrop is hidden
Fixes #14274. Fixes #14632.
-rw-r--r--js/modal.js5
1 files changed, 2 insertions, 3 deletions
diff --git a/js/modal.js b/js/modal.js
index d0426b01b..cef013a56 100644
--- a/js/modal.js
+++ b/js/modal.js
@@ -107,9 +107,6 @@
this.isShown = false
- this.$body.removeClass('modal-open')
-
- this.resetScrollbar()
this.escape()
$(document).off('focusin.bs.modal')
@@ -150,6 +147,8 @@
var that = this
this.$element.hide()
this.backdrop(function () {
+ that.$body.removeClass('modal-open')
+ that.resetScrollbar()
that.$element.trigger('hidden.bs.modal')
})
}