File tree Expand file tree Collapse file tree 1 file changed +4
-10
lines changed
Expand file tree Collapse file tree 1 file changed +4
-10
lines changed Original file line number Diff line number Diff line change @@ -49,22 +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- vh / 2
52+ top + textAreaRef . current . getBoundingClientRect ( ) . top > vh / 2
5653 )
57- style . bottom = textAreaRef . current . offsetHeight - caret . top ;
54+ style . bottom = textAreaRef . current . offsetHeight - top ;
5855 else style . top = top ;
5956
6057 if (
6158 suggestionsAutoplace &&
62- left +
63- textAreaRef . current . getBoundingClientRect ( ) . left +
64- textAreaRef . current . ownerDocument . defaultView . pageXOffset >
65- vw / 2
59+ left + textAreaRef . current . getBoundingClientRect ( ) . left > vw / 2
6660 )
67- style . right = textAreaRef . current . offsetWidth - caret . left ;
61+ style . right = textAreaRef . current . offsetWidth - left ;
6862 else style . left = left ;
6963
7064 return (
You can’t perform that action at this time.
0 commit comments