Skip to content

Commit

Permalink
Fix bug with typeahead positioning (#5859)
Browse files Browse the repository at this point in the history
  • Loading branch information
thegreatercurve authored Apr 9, 2024
1 parent dc60758 commit 9b229cd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/lexical-react/src/shared/LexicalMenu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,9 @@ export function useMenuAnchorRef(
if (rootElement !== null && resolution !== null) {
const {left, top, width, height} = resolution.getRect();
const anchorHeight = anchorElementRef.current.offsetHeight; // use to position under anchor
containerDiv.style.top = `${top + anchorHeight + 3}px`;
containerDiv.style.top = `${
top + window.pageYOffset + anchorHeight + 3
}px`;
containerDiv.style.left = `${left + window.pageXOffset}px`;
containerDiv.style.height = `${height}px`;
containerDiv.style.width = `${width}px`;
Expand Down

0 comments on commit 9b229cd

Please sign in to comment.