T45d Site · Components passes review; Slash leaves a hidden field alone; the review log moves to tasks/reviews.md
This commit is contained in:
1 parent
4aff314bb5
commit
ffbb37183d
4 files changed
+330
-325
No files matched your search
@@ -6,7 +6,7 @@ export function Find({ query, onQuery, onEnter, className }: { query: string; on
|
||||
const field = useRef<HTMLInputElement>(null);
|
||||
useEffect(() => {
|
||||
const slash = (e: KeyboardEvent) => {
|
||||
if (e.key !== "/" || e.metaKey || e.ctrlKey || typing(e)) return;
|
||||
if (e.key !== "/" || e.metaKey || e.ctrlKey || typing(e) || !field.current?.checkVisibility()) return;
|
||||
e.preventDefault();
|
||||
field.current?.focus();
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user