File tree Expand file tree Collapse file tree 1 file changed +4
-17
lines changed
Expand file tree Collapse file tree 1 file changed +4
-17
lines changed Original file line number Diff line number Diff line change @@ -49,29 +49,16 @@ export const SuggestionsDropdown: React.FunctionComponent<SuggestionsDropdownPro
4949 const style : React . CSSProperties = { } ;
5050 if (
5151 suggestionsAutoplace &&
52- top +
53- textAreaRef . current . getBoundingClientRect ( ) . top +
54- textAreaRef . current . ownerDocument . defaultView . pageYOffset +
55- caret . lineHeight * 1.5 * suggestions . length >
56- vh
52+ top + textAreaRef . current . getBoundingClientRect ( ) . top > vh / 2
5753 )
58- style . bottom = textAreaRef . current . offsetHeight - caret . top ;
54+ style . bottom = textAreaRef . current . offsetHeight - top ;
5955 else style . top = top ;
6056
6157 if (
6258 suggestionsAutoplace &&
63- left +
64- 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
59+ left + textAreaRef . current . getBoundingClientRect ( ) . left > vw / 2
7360 )
74- style . right = textAreaRef . current . offsetWidth - caret . left ;
61+ style . right = textAreaRef . current . offsetWidth - left ;
7562 else style . left = left ;
7663
7764 return (
You can’t perform that action at this time.
0 commit comments