Fixed event propagation when closing menu