codexly-ui 0.19.3 → 0.19.4

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.
@@ -3129,7 +3129,15 @@ class ClxTooltipDirective {
3129
3129
  const { signal } = this._abort;
3130
3130
  host.addEventListener('mouseenter', () => this._scheduleShow(), { signal });
3131
3131
  host.addEventListener('mouseleave', () => this._scheduleHide(), { signal });
3132
- host.addEventListener('focus', () => this._scheduleShow(), { signal });
3132
+ // :focus-visible, not a bare 'focus' check — a modal/drawer restores focus to its trigger
3133
+ // button programmatically when it closes (standard a11y behavior), which fires 'focus' on
3134
+ // this host with no real hover/keyboard interaction behind it. That reopened the tooltip and
3135
+ // left it stuck floating over the page after the modal was dismissed. :focus-visible only
3136
+ // matches when the browser itself determines the focus came from keyboard navigation, not
3137
+ // from a programmatic .focus() call or a mouse/touch click — exactly the real-vs-restored
3138
+ // distinction needed here.
3139
+ host.addEventListener('focus', () => { if (host.matches(':focus-visible'))
3140
+ this._scheduleShow(); }, { signal });
3133
3141
  host.addEventListener('blur', () => this._scheduleHide(), { signal });
3134
3142
  // Touch devices fire 'mouseenter'/'focus' on tap but never a real
3135
3143
  // 'mouseleave' — dismiss immediately (no fade) so the bubble can't