@cosxai/ui 0.23.1 → 0.23.2
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
CHANGED
|
@@ -78,6 +78,13 @@ export function useKeyboardHotkey(
|
|
|
78
78
|
if (skipWhenModalOpen && document.querySelector('[role="dialog"]')) {
|
|
79
79
|
return;
|
|
80
80
|
}
|
|
81
|
+
// The key is OURS once every guard passed — swallow its default
|
|
82
|
+
// action. Without this, a hotkey that opens a dialog with an
|
|
83
|
+
// autofocused input sees the same keystroke land as text ("s"
|
|
84
|
+
// typed into the invite search, meta QA 2026-08-19): the
|
|
85
|
+
// browser's text-insertion runs AFTER keydown, by which time
|
|
86
|
+
// focus has moved into the new input.
|
|
87
|
+
e.preventDefault();
|
|
81
88
|
handlerRef.current(e);
|
|
82
89
|
};
|
|
83
90
|
window.addEventListener("keydown", onKey);
|