Popover overflows if it's close to the right end of the window
Created by: nchankov
Although it's working properly on the left side, on the right side it doesn't encounter that it's close to the end of the window and a vertical scroll bar is displayed.
Probably it's the same with tooltip.