Skip to content

Commit

Permalink
fix(richtext-lexical): incorrect table action menu placement (#10627)
Browse files Browse the repository at this point in the history
Fixes #10626

This was originally fixed in this [lexical
PR](facebook/lexical#4301), however it seems
both the `TypeAheadMenu` plugin and the `TableActionMenu` plugin are
broken in lexical playground again.

I was unable to find any issues with the `SlashMenu` in our case so I
left it as is.

## Before


https://github.com/user-attachments/assets/5f8287a2-2875-4eb5-9402-933b0ce30af5

## After


https://github.com/user-attachments/assets/44394923-3dd8-4fd7-9d58-2c29886490e6
  • Loading branch information
rilrom authored Jan 20, 2025
1 parent 4bde09a commit 9684d31
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ function TableActionMenu({
let topPosition = menuButtonRect.top
if (topPosition + dropDownElementRect.height > window.innerHeight) {
const position = menuButtonRect.bottom - dropDownElementRect.height
topPosition = (position < 0 ? margin : position) + window.pageYOffset
topPosition = position < 0 ? margin : position
}
dropDownElement.style.top = `${topPosition}px`
}
Expand Down

0 comments on commit 9684d31

Please sign in to comment.