Tooltip is displayed beyond the screen

When tooltip is too high to be shown below the mouse cursor it is moved above the mouse cursor. This is fine for most use cases, however if there is not enough space above the mouse cursor, upper part of the tooltip is displayed beyond the screen. In such case I would like to display the tooltip at yPos=0 or yPos=screenHeight-tooltipHeight if tooltipHeigh < screenHeight (I want the upper part to be always visible). How to do it?

Example: https://snippet.webix.com/be9f1gib

For few first lines, tooltip is ok, then it goes off screen (for typical laptop screen, Material skin)

https://snippet.webix.com/f9v7jmo2

Thanks a lot @intregal !

By the way, such tooltip behavior looks incorrect, so will provide an adjustment fix in the next Webix update.