Merge pull request #171 from toeverything/bug/fix-scorll

fix: #106
This commit is contained in:
DiamondThree
2022-08-10 16:08:59 +08:00
committed by GitHub

View File

@@ -129,8 +129,12 @@ export const CommandMenu = ({ editor, hooks, style }: CommandMenuProps) => {
if (clientHeight - rectTop <= COMMAND_MENU_HEIGHT) {
setCommandMenuPosition({
left: rect.left - left,
bottom: rectTop - top + 10,
top: 'initial',
top:
rectTop -
top -
COMMAND_MENU_HEIGHT +
20,
bottom: 'initial',
});
} else {
setCommandMenuPosition({