@nectary/components 4.5.0 → 4.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/tooltip/index.js +5 -6
package/package.json
CHANGED
package/tooltip/index.js
CHANGED
|
@@ -212,14 +212,13 @@ defineCustomElement('sinch-tooltip', class extends NectaryElement {
|
|
|
212
212
|
if (!this.isDomConnected) {
|
|
213
213
|
return;
|
|
214
214
|
}
|
|
215
|
+
if (this.#isSubscribed) {
|
|
216
|
+
this.#tooltipState.destroy();
|
|
217
|
+
this.#unsubscribeMouseEnterEvent();
|
|
218
|
+
}
|
|
215
219
|
const text = this.text;
|
|
216
220
|
this.#$tooltipText.textContent = text;
|
|
217
|
-
if (text.length
|
|
218
|
-
if (this.#isSubscribed) {
|
|
219
|
-
this.#tooltipState.destroy();
|
|
220
|
-
this.#unsubscribeMouseEnterEvent();
|
|
221
|
-
}
|
|
222
|
-
} else {
|
|
221
|
+
if (text.length !== 0) {
|
|
223
222
|
this.#subscribeMouseEnterEvent();
|
|
224
223
|
}
|
|
225
224
|
}
|