diff options
| author | Mark Otto <[email protected]> | 2020-04-13 15:34:08 -0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2020-04-13 15:34:08 -0700 |
| commit | febdcefcd7d65b02b9d23807d7940b1e60053f43 (patch) | |
| tree | 16b6ac57144ca5bcf8faa25bd4cdfbd6fbd86402 /js/src/modal.js | |
| parent | 232de79db8efb39a925b340a8b3de4e5834de643 (diff) | |
| parent | 1004e3e786f707853043dd427317cd4033a04211 (diff) | |
| download | bootstrap-febdcefcd7d65b02b9d23807d7940b1e60053f43.tar.xz bootstrap-febdcefcd7d65b02b9d23807d7940b1e60053f43.zip | |
Merge branch 'master' into release-drafter
Diffstat (limited to 'js/src/modal.js')
| -rw-r--r-- | js/src/modal.js | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/js/src/modal.js b/js/src/modal.js index ca77359ca..d5f1c8c9a 100644 --- a/js/src/modal.js +++ b/js/src/modal.js @@ -60,7 +60,6 @@ const EVENT_MOUSEUP_DISMISS = `mouseup.dismiss${EVENT_KEY}` const EVENT_MOUSEDOWN_DISMISS = `mousedown.dismiss${EVENT_KEY}` const EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}` -const CLASS_NAME_SCROLLABLE = 'modal-dialog-scrollable' const CLASS_NAME_SCROLLBAR_MEASURER = 'modal-scrollbar-measure' const CLASS_NAME_BACKDROP = 'modal-backdrop' const CLASS_NAME_OPEN = 'modal-open' @@ -249,11 +248,10 @@ class Modal { this._element.style.display = 'block' this._element.removeAttribute('aria-hidden') this._element.setAttribute('aria-modal', true) + this._element.scrollTop = 0 - if (this._dialog.classList.contains(CLASS_NAME_SCROLLABLE) && modalBody) { + if (modalBody) { modalBody.scrollTop = 0 - } else { - this._element.scrollTop = 0 } if (transition) { |
