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

github.com/twbs/bootstrap.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'js/dist/modal.js')
-rw-r--r--js/dist/modal.js12
1 files changed, 9 insertions, 3 deletions
diff --git a/js/dist/modal.js b/js/dist/modal.js
index ce42158275..ddc88d9a68 100644
--- a/js/dist/modal.js
+++ b/js/dist/modal.js
@@ -1,5 +1,5 @@
/*!
- * Bootstrap modal.js v4.2.1 (https://getbootstrap.com/)
+ * Bootstrap modal.js v4.3.0 (https://getbootstrap.com/)
* Copyright 2011-2019 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
@@ -69,7 +69,7 @@
*/
var NAME = 'modal';
- var VERSION = '4.2.1';
+ var VERSION = '4.3.0';
var DATA_KEY = 'bs.modal';
var EVENT_KEY = "." + DATA_KEY;
var DATA_API_KEY = '.data-api';
@@ -102,6 +102,7 @@
CLICK_DATA_API: "click" + EVENT_KEY + DATA_API_KEY
};
var ClassName = {
+ SCROLLABLE: 'modal-dialog-scrollable',
SCROLLBAR_MEASURER: 'modal-scrollbar-measure',
BACKDROP: 'modal-backdrop',
OPEN: 'modal-open',
@@ -110,6 +111,7 @@
};
var Selector = {
DIALOG: '.modal-dialog',
+ MODAL_BODY: '.modal-body',
DATA_TOGGLE: '[data-toggle="modal"]',
DATA_DISMISS: '[data-dismiss="modal"]',
FIXED_CONTENT: '.fixed-top, .fixed-bottom, .is-fixed, .sticky-top',
@@ -287,7 +289,11 @@
this._element.setAttribute('aria-modal', true);
- this._element.scrollTop = 0;
+ if ($(this._dialog).hasClass(ClassName.SCROLLABLE)) {
+ this._dialog.querySelector(Selector.MODAL_BODY).scrollTop = 0;
+ } else {
+ this._element.scrollTop = 0;
+ }
if (transition) {
Util.reflow(this._element);