Commit 3f31351f authored by Igor Stuev's avatar Igor Stuev Committed by GitHub

Update ui/snippets/searchBar/SearchBarInput.tsx

Co-authored-by: default avatartom goriunov <tom@ohhhh.me>
parent 7a436b85
......@@ -35,8 +35,8 @@ const SearchBarInput = ({ onChange, onSubmit, isHomepage, onFocus, onBlur, onHid
setIsSticky(false);
}
}
if (isMobile && innerRef?.current?.getBoundingClientRect() && innerRef?.current?.getBoundingClientRect().y < TOP_BAR_HEIGHT) {
const clientRect = isMobile && innerRef?.current?.getBoundingClientRect();
if (clientRect && clientRect.y < TOP_BAR_HEIGHT) {
onHide?.();
}
}, [ isMobile, onHide, isHomepage ]);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment