Removed the logic of onMouseLeave. The logic of clicking to open and clicking to close is clearer. Fixes: #1898