hiding options menu correctly when closing from keyboard