Skip to content

Commit 9684d31

Browse files
authored
fix(richtext-lexical): incorrect table action menu placement (#10627)
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
1 parent 4bde09a commit 9684d31

File tree

1 file changed

+1
-1
lines changed
  • packages/richtext-lexical/src/features/experimental_table/client/plugins/TableActionMenuPlugin

1 file changed

+1
-1
lines changed

packages/richtext-lexical/src/features/experimental_table/client/plugins/TableActionMenuPlugin/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ function TableActionMenu({
175175
let topPosition = menuButtonRect.top
176176
if (topPosition + dropDownElementRect.height > window.innerHeight) {
177177
const position = menuButtonRect.bottom - dropDownElementRect.height
178-
topPosition = (position < 0 ? margin : position) + window.pageYOffset
178+
topPosition = position < 0 ? margin : position
179179
}
180180
dropDownElement.style.top = `${topPosition}px`
181181
}

0 commit comments

Comments
 (0)