Orientation component when opening

Hello,

I created a custom component that allows me, when I write a text, open a window that contains a table containing different corresponding proposals to the specified text.

I work with IE and Firefox. How to change the orientation of the popup automatically depending on where the component is placed? If the bottom of the page, the popup opens up and if there is enough space, it opens downward.

I would avoid my component is cut (see screen capture attached). Thank you in advance for your help …
15408.jpg

Is it a server side or a client side component? On the client side you have access to the browser size and component’s absolute position, and you can then calculate to which way it should open. For example ComboBox does this and opens upwards if there is not enough space downwards.