ivaynberg/select2 — pull request #1667 by duckinator (2013-08-28 17:25:55+00:00)
Title: Clicking outside of dropdown removes select2-container-active class.

If you open a select2 dropdown, then click anywhere to close it, it does not remove the select2-container-active class. This can lead to it appearing as if multiple select2 dropdowns are selected.

I made [select2.js#L1324](https://github.com/duckinator/select2/blob/3c2d7f7310c5323827069eab6be1d7a0243dfc0c/select2.js#L1324) remove the select2-container-active class, mirroring the behavior found at [select2.js#L1248](https://github.com/ivaynberg/select2/blob/c4529b8700fb1cc2de5e06b9177147581e0e69d5/select2.js#L1248). It already worked when navigating using the keyboard.

Closes #1661.