mirror of
https://github.com/tenrok/bootstrap.git
synced 2026-06-05 16:42:29 +03:00
remove old references to jquery and some fixes
This commit is contained in:
+3
-3
@@ -232,7 +232,7 @@ class Modal {
|
||||
}
|
||||
|
||||
_showElement(relatedTarget) {
|
||||
const transition = $(this._element).hasClass(ClassName.FADE)
|
||||
const transition = this._element.classList.contains(ClassName.FADE)
|
||||
|
||||
if (!this._element.parentNode ||
|
||||
this._element.parentNode.nodeType !== Node.ELEMENT_NODE) {
|
||||
@@ -295,14 +295,14 @@ class Modal {
|
||||
|
||||
_setEscapeEvent() {
|
||||
if (this._isShown && this._config.keyboard) {
|
||||
$(this._element).on(Event.KEYDOWN_DISMISS, (event) => {
|
||||
EventHandler.on(this._element, Event.KEYDOWN_DISMISS, (event) => {
|
||||
if (event.which === ESCAPE_KEYCODE) {
|
||||
event.preventDefault()
|
||||
this.hide()
|
||||
}
|
||||
})
|
||||
} else if (!this._isShown) {
|
||||
$(this._element).off(Event.KEYDOWN_DISMISS)
|
||||
EventHandler.off(this._element, Event.KEYDOWN_DISMISS)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user