diff options
author | Chris Rebert <code@chrisrebert.com> | 2016-06-05 04:21:15 +0300 |
---|---|---|
committer | Chris Rebert <code@chrisrebert.com> | 2016-06-05 04:21:15 +0300 |
commit | 0f3d427bbdccec8597dff63494d390df6b441c24 (patch) | |
tree | f6d0ef48442bd0067210188031bd091aab8fdf16 /js/dist/modal.js | |
parent | eb350d1a7c91a42b4d943b13edf9304309920cb7 (diff) |
grunt
[ci skip]
Diffstat (limited to 'js/dist/modal.js')
-rw-r--r-- | js/dist/modal.js | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/js/dist/modal.js b/js/dist/modal.js index 84cf9835ec..0ed976d4d0 100644 --- a/js/dist/modal.js +++ b/js/dist/modal.js @@ -27,6 +27,7 @@ var Modal = (function ($) { var JQUERY_NO_CONFLICT = $.fn[NAME]; var TRANSITION_DURATION = 300; var BACKDROP_TRANSITION_DURATION = 150; + var ESCAPE_KEYCODE = 27; // KeyboardEvent.which value for Escape (Esc) key var Default = { backdrop: true, @@ -222,6 +223,7 @@ var Modal = (function ($) { } this._element.style.display = 'block'; + this._element.removeAttribute('aria-hidden'); this._element.scrollTop = 0; if (transition) { @@ -270,7 +272,7 @@ var Modal = (function ($) { if (this._isShown && this._config.keyboard) { $(this._element).on(Event.KEYDOWN_DISMISS, function (event) { - if (event.which === 27) { + if (event.which === ESCAPE_KEYCODE) { _this4.hide(); } }); @@ -293,6 +295,7 @@ var Modal = (function ($) { var _this5 = this; this._element.style.display = 'none'; + this._element.setAttribute('aria-hidden', 'true'); this._showBackdrop(function () { $(document.body).removeClass(ClassName.OPEN); _this5._resetAdjustments(); @@ -398,7 +401,7 @@ var Modal = (function ($) { } if (this._isBodyOverflowing && !isModalOverflowing) { - this._element.style.paddingRight = this._scrollbarWidth + 'px~'; + this._element.style.paddingRight = this._scrollbarWidth + 'px'; } } }, { |