Show popup to the left of input if there is not enough space to the right