Context menu positioning fix

If a context menu opens near the sides of the page it can extend out of the viewable area.