improve context_menu appear/disappear depending if it is below or above