diff options
author | XhmikosR <xhmikosr@gmail.com> | 2020-05-13 21:53:43 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-13 21:53:43 +0300 |
commit | de7af5ee0738d08ef2d6702654834beb5bfce35e (patch) | |
tree | 371b751a7f96f96399e53d1767b8f0c4610cb268 /js/dist/tooltip.js | |
parent | 53eb7d38830f1e7c593069c8f5b40f4127563317 (diff) |
Dist (#30694)
Diffstat (limited to 'js/dist/tooltip.js')
-rw-r--r-- | js/dist/tooltip.js | 37 |
1 files changed, 18 insertions, 19 deletions
diff --git a/js/dist/tooltip.js b/js/dist/tooltip.js index 270e9bfb2c..aa6dbb4454 100644 --- a/js/dist/tooltip.js +++ b/js/dist/tooltip.js @@ -467,11 +467,11 @@ if (event) { var dataKey = this.constructor.DATA_KEY; - var context = Data.getData(event.delegateTarget, dataKey); + var context = Data.getData(event.target, dataKey); if (!context) { - context = new this.constructor(event.delegateTarget, this._getDelegateConfig()); - Data.setData(event.delegateTarget, dataKey, context); + context = new this.constructor(event.target, this._getDelegateConfig()); + Data.setData(event.target, dataKey, context); } context._activeTrigger.click = !context._activeTrigger.click; @@ -496,7 +496,7 @@ clearTimeout(this._timeout); Data.removeData(this.element, this.constructor.DATA_KEY); EventHandler.off(this.element, this.constructor.EVENT_KEY); - EventHandler.off(SelectorEngine.closest(this.element, "." + CLASS_NAME_MODAL), 'hide.bs.modal', this._hideModalHandler); + EventHandler.off(this.element.closest("." + CLASS_NAME_MODAL), 'hide.bs.modal', this._hideModalHandler); if (this.tip) { this.tip.parentNode.removeChild(this.tip); @@ -672,8 +672,7 @@ _proto.setContent = function setContent() { var tip = this.getTipElement(); this.setElementContent(SelectorEngine.findOne(SELECTOR_TOOLTIP_INNER, tip), this.getTitle()); - tip.classList.remove(CLASS_NAME_FADE); - tip.classList.remove(CLASS_NAME_SHOW); + tip.classList.remove(CLASS_NAME_FADE, CLASS_NAME_SHOW); }; _proto.setElementContent = function setElementContent(element, content) { @@ -693,7 +692,7 @@ element.appendChild(content); } } else { - element.innerText = content.textContent; + element.textContent = content.textContent; } return; @@ -706,7 +705,7 @@ element.innerHTML = content; } else { - element.innerText = content; + element.textContent = content; } }; @@ -747,7 +746,7 @@ return _this3._handlePopperPlacementChange(data); } }; - return _objectSpread2({}, defaultBsConfig, {}, this.config.popperConfig); + return _objectSpread2(_objectSpread2({}, defaultBsConfig), this.config.popperConfig); }; _proto._addAttachmentClass = function _addAttachmentClass(attachment) { @@ -761,7 +760,7 @@ if (typeof this.config.offset === 'function') { offset.fn = function (data) { - data.offsets = _objectSpread2({}, data.offsets, {}, _this4.config.offset(data.offsets, _this4.element) || {}); + data.offsets = _objectSpread2(_objectSpread2({}, data.offsets), _this4.config.offset(data.offsets, _this4.element) || {}); return data; }; } else { @@ -814,10 +813,10 @@ } }; - EventHandler.on(SelectorEngine.closest(this.element, "." + CLASS_NAME_MODAL), 'hide.bs.modal', this._hideModalHandler); + EventHandler.on(this.element.closest("." + CLASS_NAME_MODAL), 'hide.bs.modal', this._hideModalHandler); if (this.config.selector) { - this.config = _objectSpread2({}, this.config, { + this.config = _objectSpread2(_objectSpread2({}, this.config), {}, { trigger: 'manual', selector: '' }); @@ -837,11 +836,11 @@ _proto._enter = function _enter(event, context) { var dataKey = this.constructor.DATA_KEY; - context = context || Data.getData(event.delegateTarget, dataKey); + context = context || Data.getData(event.target, dataKey); if (!context) { - context = new this.constructor(event.delegateTarget, this._getDelegateConfig()); - Data.setData(event.delegateTarget, dataKey, context); + context = new this.constructor(event.target, this._getDelegateConfig()); + Data.setData(event.target, dataKey, context); } if (event) { @@ -870,11 +869,11 @@ _proto._leave = function _leave(event, context) { var dataKey = this.constructor.DATA_KEY; - context = context || Data.getData(event.delegateTarget, dataKey); + context = context || Data.getData(event.target, dataKey); if (!context) { - context = new this.constructor(event.delegateTarget, this._getDelegateConfig()); - Data.setData(event.delegateTarget, dataKey, context); + context = new this.constructor(event.target, this._getDelegateConfig()); + Data.setData(event.target, dataKey, context); } if (event) { @@ -922,7 +921,7 @@ config.container = config.container[0]; } - config = _objectSpread2({}, this.constructor.Default, {}, dataAttributes, {}, typeof config === 'object' && config ? config : {}); + config = _objectSpread2(_objectSpread2(_objectSpread2({}, this.constructor.Default), dataAttributes), typeof config === 'object' && config ? config : {}); if (typeof config.delay === 'number') { config.delay = { |