1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-08-26 06:44:35 +02:00

Handle aria-hidden on modal container when showing/hiding

Fixes #19878
This commit is contained in:
Patrick H. Lauke
2016-05-10 23:53:49 +01:00
parent 5aa32b3f3a
commit b107e3342a
2 changed files with 19 additions and 0 deletions

View File

@@ -223,6 +223,7 @@ const Modal = (($) => {
}
this._element.style.display = 'block'
this._element.removeAttribute('aria-hidden')
this._element.scrollTop = 0
if (transition) {
@@ -290,6 +291,7 @@ const Modal = (($) => {
_hideModal() {
this._element.style.display = 'none'
this._element.setAttribute('aria-hidden', 'true')
this._showBackdrop(() => {
$(document.body).removeClass(ClassName.OPEN)
this._resetAdjustments()