remove redundency
compare context to window
...

This will allow a user to click near the bottom of the window and
show the menu even if the html document continues, which
would hide the menu.