File tree Expand file tree Collapse file tree 1 file changed +4
-11
lines changed
Expand file tree Collapse file tree 1 file changed +4
-11
lines changed Original file line number Diff line number Diff line change @@ -51,9 +51,8 @@ export const SuggestionsDropdown: React.FunctionComponent<SuggestionsDropdownPro
5151 suggestionsAutoplace &&
5252 top +
5353 textAreaRef . current . getBoundingClientRect ( ) . top +
54- textAreaRef . current . ownerDocument . defaultView . pageYOffset +
55- caret . lineHeight * 1.5 * suggestions . length >
56- vh
54+ textAreaRef . current . ownerDocument . defaultView . pageYOffset >
55+ vh / 2
5756 )
5857 style . bottom = textAreaRef . current . offsetHeight - caret . top ;
5958 else style . top = top ;
@@ -62,14 +61,8 @@ export const SuggestionsDropdown: React.FunctionComponent<SuggestionsDropdownPro
6261 suggestionsAutoplace &&
6362 left +
6463 textAreaRef . current . getBoundingClientRect ( ) . left +
65- textAreaRef . current . ownerDocument . defaultView . pageXOffset +
66- caret . lineHeight *
67- 0.6666 *
68- Math . max . apply (
69- Math ,
70- suggestions . map ( x => x . preview . toString ( ) . length )
71- ) >
72- vw
64+ textAreaRef . current . ownerDocument . defaultView . pageXOffset >
65+ vw / 2
7366 )
7467 style . right = textAreaRef . current . offsetWidth - caret . left ;
7568 else style . left = left ;
You can’t perform that action at this time.
0 commit comments