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:
authorJohann-S <johann.servoire@gmail.com>2019-06-13 11:43:27 +0300
committerXhmikosR <xhmikosr@gmail.com>2019-06-18 15:02:58 +0300
commit6c9f833a907a8e293f567af48c37c355f1ba867d (patch)
tree1c6d18aff21775f179f25d2bbf7597731355135d /js/src/tooltip.js
parent24abed13369469c174acbec5e5939e252b29936f (diff)
tooltip dispose:removing only own event handler (#28896)
Diffstat (limited to 'js/src/tooltip.js')
-rw-r--r--js/src/tooltip.js14
1 files changed, 8 insertions, 6 deletions
diff --git a/js/src/tooltip.js b/js/src/tooltip.js
index 81a2dedc6c..b200656658 100644
--- a/js/src/tooltip.js
+++ b/js/src/tooltip.js
@@ -226,7 +226,7 @@ class Tooltip {
$.removeData(this.element, this.constructor.DATA_KEY)
$(this.element).off(this.constructor.EVENT_KEY)
- $(this.element).closest('.modal').off('hide.bs.modal')
+ $(this.element).closest('.modal').off('hide.bs.modal', this._hideModalHandler)
if (this.tip) {
$(this.tip).remove()
@@ -535,13 +535,15 @@ class Tooltip {
}
})
+ this._hideModalHandler = () => {
+ if (this.element) {
+ this.hide()
+ }
+ }
+
$(this.element).closest('.modal').on(
'hide.bs.modal',
- () => {
- if (this.element) {
- this.hide()
- }
- }
+ this._hideModalHandler
)
if (this.config.selector) {