Skip to content

Commit f3c4feb

Browse files
author
Guillaume Chau
committed
Version bump
1 parent bf57c13 commit f3c4feb

File tree

4 files changed

+26
-6
lines changed

4 files changed

+26
-6
lines changed

dist/v-tooltip.esm.js

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2695,6 +2695,8 @@ var Tooltip = function () {
26952695
// set initial state
26962696
this._isOpen = false;
26972697

2698+
this._isDisposed = false;
2699+
26982700
// set event listeners
26992701
this._setEventListeners(reference, events, options);
27002702
}
@@ -2948,13 +2950,19 @@ var Tooltip = function () {
29482950

29492951
// Fix position
29502952
requestAnimationFrame(function () {
2951-
if (_this.popperInstance) {
2953+
if (!_this._isDisposed && _this.popperInstance) {
29522954
_this.popperInstance.update();
29532955

29542956
// Show the tooltip
29552957
requestAnimationFrame(function () {
2956-
tooltipNode.setAttribute('aria-hidden', 'false');
2958+
if (!_this._isDisposed) {
2959+
tooltipNode.setAttribute('aria-hidden', 'false');
2960+
} else {
2961+
_this.dispose();
2962+
}
29572963
});
2964+
} else {
2965+
_this.dispose();
29582966
}
29592967
});
29602968

@@ -2997,6 +3005,8 @@ var Tooltip = function () {
29973005
value: function _dispose() {
29983006
var _this3 = this;
29993007

3008+
this._isDisposed = true;
3009+
30003010
// remove event listeners first to prevent any unexpected behaviour
30013011
this._events.forEach(function (_ref) {
30023012
var func = _ref.func,

0 commit comments

Comments
 (0)