codexly-ui 0.5.1 → 0.5.3
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/fesm2022/codexly-ui.mjs
CHANGED
|
@@ -2322,10 +2322,14 @@ class ClxTooltipDirective {
|
|
|
2322
2322
|
host.addEventListener('focus', () => this._scheduleShow(), { signal });
|
|
2323
2323
|
host.addEventListener('blur', () => this._scheduleHide(), { signal });
|
|
2324
2324
|
// Touch devices fire 'mouseenter'/'focus' on tap but never a real
|
|
2325
|
-
// 'mouseleave' —
|
|
2326
|
-
//
|
|
2327
|
-
|
|
2328
|
-
host
|
|
2325
|
+
// 'mouseleave' — dismiss immediately (no fade) so the bubble can't
|
|
2326
|
+
// outlive the tap and float over whatever it triggered (e.g. a modal
|
|
2327
|
+
// opening on the same gesture). Capture-phase 'click' fires before the
|
|
2328
|
+
// host's own (click) handler — the one that actually opens the modal —
|
|
2329
|
+
// so the bubble is gone from the DOM before the modal is created.
|
|
2330
|
+
host.addEventListener('touchend', () => this._hideImmediate(), { signal });
|
|
2331
|
+
host.addEventListener('touchcancel', () => this._hideImmediate(), { signal });
|
|
2332
|
+
host.addEventListener('click', () => this._hideImmediate(), { signal, capture: true });
|
|
2329
2333
|
this._destroyRef.onDestroy(() => {
|
|
2330
2334
|
this._destroyed = true;
|
|
2331
2335
|
this._abort.abort();
|
|
@@ -2407,6 +2411,18 @@ class ClxTooltipDirective {
|
|
|
2407
2411
|
ref.destroy();
|
|
2408
2412
|
});
|
|
2409
2413
|
}
|
|
2414
|
+
/** Synchronous teardown, no fade — used on touchend so the bubble can't linger over UI the tap opens. */
|
|
2415
|
+
_hideImmediate() {
|
|
2416
|
+
this._clearTimers();
|
|
2417
|
+
this._destroyBubble();
|
|
2418
|
+
if (this._pendingRef) {
|
|
2419
|
+
const el = this._pendingRef.location.nativeElement;
|
|
2420
|
+
this._animate.stop(el);
|
|
2421
|
+
this._appRef.detachView(this._pendingRef.hostView);
|
|
2422
|
+
this._pendingRef.destroy();
|
|
2423
|
+
this._pendingRef = null;
|
|
2424
|
+
}
|
|
2425
|
+
}
|
|
2410
2426
|
// ── Positioning ──────────────────────────────────────────────────────────
|
|
2411
2427
|
_resolvePosition(el) {
|
|
2412
2428
|
const requested = this.clxTooltipPosition();
|