Changes the placement of the floating element to keep it in view.
This prevents the floating element from overflowing along its side axis by flipping it to the opposite side by default.
TODO