There are cases when vertical space is limited (e.g. if editor is placed in an iframe). In such cases the current bubble placement algorithm is sub-optimal - it can place the bubble outside the window even if it is not necessary.
The new algorithm checks the borders and tries to place the bubble as follows:
Place the bubble downwards if there is enough space (like before)
Otherwise place the bubble upwards (like before), but only if there is enough space
Otherwise center the bubble vertically in the hosting frame
There are cases when vertical space is limited (e.g. if editor is placed in an iframe). In such cases the current bubble placement algorithm is sub-optimal - it can place the bubble outside the window even if it is not necessary.
The new algorithm checks the borders and tries to place the bubble as follows: