Collapse project dropdown when clicked while expanded.

I noticed that clicking the project dropdown while it is expanded does not collapse it like a typical dropdown behaves.  This commit implements that behavior.