fix commneu menu style

This commit is contained in:
DiamondThree
2022-07-28 14:42:40 +08:00
parent 6c26485343
commit d7c9d430e4
2 changed files with 29 additions and 25 deletions
@@ -113,7 +113,8 @@ export const CommandMenu = ({ editor, hooks, style }: CommandMenuProps) => {
let clientHeight =
document.documentElement.clientHeight;
const COMMAND_MENU_HEIGHT = 509;
const COMMAND_MENU_HEIGHT =
window.innerHeight * 0.4;
if (clientHeight - top <= COMMAND_MENU_HEIGHT) {
top = clientHeight - top + 10;
setCommandMenuPosition({