ivaynberg/select2 — pull request #1939 by alekstorm (2013-11-27 23:23:20+00:00)
Title: Cancel dropdown positioning if element isn't attached to the document

If the element isn't attached to the document (which can be determined by whether `body()` returns an empty list), then `positionDropdown()` errors out spectacularly. This adds a check right before its body.