1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-09-26 05:19:15 +02:00

Improvement: harmonize usage of constants (#30285)

This commit is contained in:
Sparks
2020-03-09 16:26:29 +01:00
committed by GitHub
parent 7d8c7c4ba8
commit c47547cd09
4 changed files with 11 additions and 8 deletions

View File

@@ -109,6 +109,7 @@ const Event = {
const ClassName = {
FADE: 'fade',
MODAL: 'modal',
SHOW: 'show'
}
@@ -235,7 +236,7 @@ class Tooltip {
Data.removeData(this.element, this.constructor.DATA_KEY)
EventHandler.off(this.element, this.constructor.EVENT_KEY)
EventHandler.off(SelectorEngine.closest(this.element, '.modal'), 'hide.bs.modal', this._hideModalHandler)
EventHandler.off(SelectorEngine.closest(this.element, `.${ClassName.MODAL}`), 'hide.bs.modal', this._hideModalHandler)
if (this.tip) {
this.tip.parentNode.removeChild(this.tip)
@@ -565,7 +566,7 @@ class Tooltip {
}
}
EventHandler.on(SelectorEngine.closest(this.element, '.modal'),
EventHandler.on(SelectorEngine.closest(this.element, `.${ClassName.MODAL}`),
'hide.bs.modal',
this._hideModalHandler
)