Doruk Kavcioglu c673ef6e33
fix(ui): gate tooltip focus-open on keyboard modality, drop refocus patch
Kobalte opens a tooltip on any trigger focus, so a menu or popover
refocusing its trigger on close popped the tooltip open under the
cursor. The old workaround patched @kobalte/core to suppress trigger
refocus for modal dropdowns dismissed by outside click — hiding the
symptom by disabling standard focus-return.

Fix it at the correct link instead: the tooltip wrapper now opens on
focus only when the last input was keyboard-driven (tracked in
lib/input-modality.ts; :focus-visible is unreliable for programmatic
refocus). Kobalte's TooltipTrigger bails when e.defaultPrevented is
set but focus events are non-cancelable, so the wrapper shadows the
property directly (verified against @kobalte/core 0.13.12).

This makes the second patch hunk unnecessary: trigger refocus on
dismiss is restored (standard WAI-ARIA behavior) and the dependency
patch shrinks to the one fix unreachable from app code.
patches/README.md updated to match.
2026-07-19 03:01:46 +03:00
..
2026-07-07 09:27:28 +02:00
2026-07-07 09:27:28 +02:00
2026-07-07 09:27:28 +02:00
2026-07-07 09:27:28 +02:00