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

Unbreak lines. (#32304)

This commit is contained in:
XhmikosR
2020-12-02 06:45:15 +02:00
committed by GitHub
parent f05d64225d
commit 701c6c6e77
9 changed files with 32 additions and 69 deletions

View File

@@ -136,11 +136,7 @@ class Modal extends BaseComponent {
this._setEscapeEvent()
this._setResizeEvent()
EventHandler.on(this._element,
EVENT_CLICK_DISMISS,
SELECTOR_DATA_DISMISS,
event => this.hide(event)
)
EventHandler.on(this._element, EVENT_CLICK_DISMISS, SELECTOR_DATA_DISMISS, event => this.hide(event))
EventHandler.on(this._dialog, EVENT_MOUSEDOWN_DISMISS, () => {
EventHandler.one(this._element, EVENT_MOUSEUP_DISMISS, event => {
@@ -237,8 +233,7 @@ class Modal extends BaseComponent {
const transition = this._element.classList.contains(CLASS_NAME_FADE)
const modalBody = SelectorEngine.findOne(SELECTOR_MODAL_BODY, this._dialog)
if (!this._element.parentNode ||
this._element.parentNode.nodeType !== Node.ELEMENT_NODE) {
if (!this._element.parentNode || this._element.parentNode.nodeType !== Node.ELEMENT_NODE) {
// Don't move modal's DOM position
document.body.appendChild(this._element)
}