Skip to content

Commit

Permalink
fix(@lexical/react/LexicalMenu) Fix check for menu cannot fit on top (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
JingkangZhang authored Apr 26, 2024
1 parent f5b6f16 commit 988a25a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/lexical-react/src/shared/LexicalMenu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,7 @@ export function useMenuAnchorRef(
if (
(top + menuHeight > window.innerHeight ||
top + menuHeight > rootElementRect.bottom) &&
top - rootElementRect.top > menuHeight
top - rootElementRect.top > menuHeight + height
) {
containerDiv.style.top = `${
top - menuHeight + window.pageYOffset - height
Expand Down

0 comments on commit 988a25a

Please sign in to comment.