Skip to content

Commit

Permalink
fix(Menu): Hide menu bar only when scrolled enough (#292)
Browse files Browse the repository at this point in the history
Keep menubar visible until user scrolled more than menu bar height, fixed below issue
  • Loading branch information
tje3d authored Sep 28, 2021
1 parent 7c248b7 commit 8cbab63
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/pancake-uikit/src/widgets/Menu/Menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ const Menu: React.FC<NavProps> = ({
}
// Avoid triggering anything at the bottom because of layout shift
else if (!isBottomOfPage) {
if (currentOffset < refPrevOffset.current) {
if (currentOffset < refPrevOffset.current || currentOffset <= MENU_HEIGHT) {
// Has scroll up
setShowMenu(true);
} else {
Expand Down

0 comments on commit 8cbab63

Please sign in to comment.