From 195df69e5969396d1aef749386ff3d4ff75a4d2c Mon Sep 17 00:00:00 2001 From: Tom Moor Date: Wed, 5 Apr 2023 22:42:51 -0400 Subject: [PATCH] fix: Another mention positioning patch --- app/editor/components/SuggestionsMenu.tsx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/editor/components/SuggestionsMenu.tsx b/app/editor/components/SuggestionsMenu.tsx index 6885b0d8d..6bdc446aa 100644 --- a/app/editor/components/SuggestionsMenu.tsx +++ b/app/editor/components/SuggestionsMenu.tsx @@ -46,7 +46,7 @@ type Position = ((TopAnchor | BottomAnchor) & (LeftAnchor | RightAnchor)) & { const defaultPosition: Position = { top: 0, bottom: undefined, - left: -1000, + left: -10000, right: undefined, isAbove: false, }; @@ -88,7 +88,6 @@ function SuggestionsMenu(props: Props) { const calculatePosition = React.useCallback( (props: Props) => { - console.log("calculatePosition"); if (!props.isActive) { return defaultPosition; } @@ -142,7 +141,7 @@ function SuggestionsMenu(props: Props) { leftPos = right - offsetWidth; } - if (top - offsetHeight > offsetParent.top + margin) { + if (top - offsetHeight > margin) { return { left: leftPos, top: undefined,