ivaynberg/select2 — pull request #1640 by francoispluchino (2013-08-21 13:38:30+00:00)
Title: Fix the auto hiding of the dropdown when the dropdown is above the container

When you create a responsive design with the dropdown in the same style that the phone native application (display a popup on all screen), the dropdown disappears immediately when you click on the select2 container.

Example:
``` css
@media (max-width: 480px) {
.select2-drop-mask {
background-color: #000;
opacity: 0.82;
}

.select2-drop {
position: fixed !important;
left: 2% !important;
top: 5% !important;
width: 96% !important;
max-height: 90% !important;
overflow-y: auto !important;
padding-top: 5px;
}
}
```

The problem is that the container reacts to the mousedown event, and that the items of dropdown react to the mouseup event.
So when you click (mousedown event) on the container, the dropdown is displayed immediately, but as you relax the button of mouse (mouseup event) just after displaying the dropdown, the items of dropdown considers the mouseup event as a request to close the dropdown.