Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/bootstrap-rubygem.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'assets/javascripts/bootstrap/modal.js')
-rw-r--r--assets/javascripts/bootstrap/modal.js11
1 files changed, 7 insertions, 4 deletions
diff --git a/assets/javascripts/bootstrap/modal.js b/assets/javascripts/bootstrap/modal.js
index af62dbd..e553e27 100644
--- a/assets/javascripts/bootstrap/modal.js
+++ b/assets/javascripts/bootstrap/modal.js
@@ -6,7 +6,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
/**
* --------------------------------------------------------------------------
- * Bootstrap (v4.0.0-alpha.2): modal.js
+ * Bootstrap (v4.0.0-alpha.3): modal.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -20,13 +20,14 @@ var Modal = (function ($) {
*/
var NAME = 'modal';
- var VERSION = '4.0.0-alpha.2';
+ var VERSION = '4.0.0-alpha.3';
var DATA_KEY = 'bs.modal';
var EVENT_KEY = '.' + DATA_KEY;
var DATA_API_KEY = '.data-api';
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';
}
}
}, {