Fixes context menus outside viewport. Fixes #458